From: Haojian Wu Date: Sat, 13 Jun 2015 08:02:16 +0000 (+0800) Subject: Fix code style. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57580e00f9d05e94889b2a64bcf06b133bfb7656;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Fix code style. --- diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index d72e553..959b0e3 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -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); } diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 891fd0b..bab7c9e 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -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(); diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 087205d..437d4d7 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -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); diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 581565a..8eb05cb 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -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); diff --git a/chromium_src/chrome/browser/printing/print_preview_message_handler.cc b/chromium_src/chrome/browser/printing/print_preview_message_handler.cc index 3971b95..51bfffc 100644 --- a/chromium_src/chrome/browser/printing/print_preview_message_handler.cc +++ b/chromium_src/chrome/browser/printing/print_preview_message_handler.cc @@ -4,14 +4,7 @@ #include "chrome/browser/printing/print_preview_message_handler.h" -#include - -#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"