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

Unified Diff: components/printing/renderer/print_web_view_helper.cc

Issue 822133003: Refactor webview to use //components/printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/printing/renderer/print_web_view_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper.cc
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index 4c9368b8fec3e1d9aebc9b8cf7ba28596c8502d9..d307a8efed9f0d0284d731f945b1c8496a5133be 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -767,6 +767,7 @@ PrintWebViewHelper::PrintWebViewHelper(
content::RenderView* render_view,
bool out_of_process_pdf_enabled,
bool print_preview_disabled,
+ bool should_ask_print_settings,
scoped_ptr<Delegate> delegate)
: content::RenderViewObserver(render_view),
content::RenderViewObserverTracker<PrintWebViewHelper>(render_view),
@@ -777,6 +778,7 @@ PrintWebViewHelper::PrintWebViewHelper(
notify_browser_of_print_failure_(true),
print_for_preview_(false),
out_of_process_pdf_enabled_(out_of_process_pdf_enabled),
+ should_ask_print_settings_(should_ask_print_settings),
delegate_(delegate.Pass()),
print_node_in_progress_(false),
is_loading_(false),
@@ -1265,7 +1267,8 @@ void PrintWebViewHelper::Print(blink::WebLocalFrame* frame,
}
// Ask the browser to show UI to retrieve the final print settings.
- if (!GetPrintSettingsFromUser(frame_ref.GetFrame(), node,
+ if (should_ask_print_settings_ &&
+ !GetPrintSettingsFromUser(frame_ref.GetFrame(), node,
dgn 2015/01/15 19:28:48 This block is disabled with a #if 0 in webview. I
sgurun-gerrit only 2015/01/15 19:39:32 I think this logic is chrome only. Webview cannot
expected_page_count,
is_scripted)) {
DidFinishPrinting(OK); // Release resources and fail silently.
« no previous file with comments | « components/printing/renderer/print_web_view_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698