mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix code style.
This commit is contained in:
@@ -138,7 +138,6 @@ WebContents::WebContents(const mate::Dictionary& options)
|
||||
inspectable_web_contents_ = managed_web_contents();
|
||||
|
||||
Observe(GetWebContents());
|
||||
printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
|
||||
}
|
||||
|
||||
WebContents::~WebContents() {
|
||||
@@ -593,7 +592,7 @@ bool WebContents::IsAudioMuted() {
|
||||
}
|
||||
|
||||
void WebContents::PrintToPDF(const base::DictionaryValue& setting,
|
||||
const PrintToPDFCallback& callback) {
|
||||
const PrintToPDFCallback& callback) {
|
||||
printing::PrintPreviewMessageHandler::FromWebContents(web_contents())->
|
||||
PrintToPDF(setting, callback);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class WebContents : public mate::EventEmitter,
|
||||
|
||||
// Print current page as PDF.
|
||||
void PrintToPDF(const base::DictionaryValue& setting,
|
||||
const PrintToPDFCallback& callback);
|
||||
const PrintToPDFCallback& callback);
|
||||
|
||||
// Editing commands.
|
||||
void Undo();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "atom/browser/ui/file_dialog.h"
|
||||
#include "atom/browser/web_dialog_helper.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "chrome/browser/printing/print_preview_message_handler.h"
|
||||
#include "chrome/browser/ui/browser_dialogs.h"
|
||||
#include "content/public/browser/child_process_security_policy.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
@@ -102,6 +103,8 @@ void CommonWebContentsDelegate::InitWithWebContents(
|
||||
owner_window_ = owner_window;
|
||||
web_contents->SetDelegate(this);
|
||||
|
||||
printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
|
||||
|
||||
// Create InspectableWebContents.
|
||||
web_contents_.reset(brightray::InspectableWebContents::Create(web_contents));
|
||||
web_contents_->SetDelegate(this);
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "brightray/browser/inspectable_web_contents.h"
|
||||
#include "brightray/browser/inspectable_web_contents_view.h"
|
||||
#include "chrome/browser/printing/print_view_manager_basic.h"
|
||||
#include "chrome/browser/printing/print_preview_message_handler.h"
|
||||
#include "chrome/browser/ui/browser_dialogs.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/public/browser/navigation_entry.h"
|
||||
#include "content/public/browser/notification_details.h"
|
||||
@@ -99,7 +97,6 @@ NativeWindow::NativeWindow(content::WebContents* web_contents,
|
||||
zoom_factor_(1.0),
|
||||
weak_factory_(this) {
|
||||
printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
|
||||
printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
|
||||
|
||||
InitWithWebContents(web_contents, this);
|
||||
|
||||
|
||||
@@ -4,14 +4,7 @@
|
||||
|
||||
#include "chrome/browser/printing/print_preview_message_handler.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/ui/file_dialog.h"
|
||||
#include "atom/browser/native_window.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
#include "base/memory/shared_memory.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
@@ -20,7 +13,6 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_ui.h"
|
||||
#include "printing/page_size_margins.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
#include "printing/pdf_metafile_skia.h"
|
||||
|
||||
Reference in New Issue
Block a user