diff options
author | sgurun <sgurun@chromium.org> | 2015-01-14 12:59:43 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-14 21:00:23 +0000 |
commit | ee20aa9a5b382180944c5f0367fdddd5f7c22aa5 (patch) | |
tree | 2dc88a804fa7687de05b63c77a287ad0a54e2788 /android_webview/native | |
parent | 5a5bf0240c72ee259f29384f1fdf307a962a3ea2 (diff) | |
download | chromium_src-ee20aa9a5b382180944c5f0367fdddd5f7c22aa5.zip chromium_src-ee20aa9a5b382180944c5f0367fdddd5f7c22aa5.tar.gz chromium_src-ee20aa9a5b382180944c5f0367fdddd5f7c22aa5.tar.bz2 |
Remove the discrepencies between chrome and android_webview print
messages to enable componentizing printing. Basically, we have
modified two print messages
PrintHostMsg_AllocateTempFileForPrinting
PrintHostMsg_TempFileForPrintingWritten
to a routed message rather then a control message to simplify
implementation. However, this prevents moving the code to components.
BUG=446509
Review URL: https://codereview.chromium.org/854513002
Cr-Commit-Position: refs/heads/master@{#311544}
Diffstat (limited to 'android_webview/native')
-rw-r--r-- | android_webview/native/aw_pdf_exporter.cc | 8 | ||||
-rw-r--r-- | android_webview/native/aw_pdf_exporter.h | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/android_webview/native/aw_pdf_exporter.cc b/android_webview/native/aw_pdf_exporter.cc index 8da47a0..fc679f3 100644 --- a/android_webview/native/aw_pdf_exporter.cc +++ b/android_webview/native/aw_pdf_exporter.cc @@ -4,7 +4,6 @@ #include "android_webview/native/aw_pdf_exporter.h" -#include "android_webview/browser/renderer_host/print_manager.h" #include "base/android/jni_android.h" #include "base/logging.h" #include "content/public/browser/browser_thread.h" @@ -48,9 +47,10 @@ void AwPdfExporter::ExportToPdf(JNIEnv* env, jobject cancel_signal) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); CreatePdfSettings(env, obj); - print_manager_.reset( - new PrintManager(web_contents_, print_settings_.get(), fd, this)); - if (!print_manager_->PrintNow()) + PrintManager* print_manager = + PrintManager::CreateForWebContents( + web_contents_, print_settings_.get(), fd, this); + if (!print_manager->PrintNow()) DidExportPdf(false); } diff --git a/android_webview/native/aw_pdf_exporter.h b/android_webview/native/aw_pdf_exporter.h index b3e3203..9ead85e 100644 --- a/android_webview/native/aw_pdf_exporter.h +++ b/android_webview/native/aw_pdf_exporter.h @@ -47,7 +47,6 @@ class AwPdfExporter : public PrintManagerDelegate { JavaObjectWeakGlobalRef java_ref_; content::WebContents* web_contents_; - scoped_ptr<PrintManager> print_manager_; scoped_ptr<printing::PrintSettings> print_settings_; DISALLOW_COPY_AND_ASSIGN(AwPdfExporter); |