Index: android_webview/native/aw_pdf_exporter.cc |
diff --git a/android_webview/native/aw_pdf_exporter.cc b/android_webview/native/aw_pdf_exporter.cc |
index 8da47a0733c416b5a67e939aa808ddd3ed120e7e..0e888c246e8032a2ee261fb69a350c6c6b5929fb 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" |
hush (inactive)
2015/01/14 01:55:47
we still need print manager in this file?
sgurun-gerrit only
2015/01/14 02:03:17
aw_pdf_exporter.h includes it since it implements
|
#include "base/android/jni_android.h" |
#include "base/logging.h" |
#include "content/public/browser/browser_thread.h" |
@@ -48,9 +47,13 @@ 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); |
+ print_manager = |
boliu
2015/01/14 01:41:02
Why call CreateForWebContents with the exact same
hush (inactive)
2015/01/14 01:55:47
print_manager is assigned 2 times?
sgurun-gerrit only
2015/01/14 02:03:17
Done.
sgurun-gerrit only
2015/01/14 02:03:17
Done.
|
+ PrintManager::CreateForWebContents( |
+ web_contents_, print_settings_.get(), fd, this); |
+ if (!print_manager->PrintNow()) |
DidExportPdf(false); |
} |