Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: android_webview/native/aw_pdf_exporter.cc

Issue 854513002: Remove the discrepencies between chrome and android_webview print (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address code review Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..fc679f32c77d4f931fc2945ab1ea371cb14e5bfc 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);
}
« android_webview/common/print_messages.h ('K') | « android_webview/native/aw_pdf_exporter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698