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

Unified Diff: chrome/renderer/printing/print_web_view_helper.h

Issue 791133006: Delegates for the printing component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using initialisation parameters instead of delegate methods 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: chrome/renderer/printing/print_web_view_helper.h
diff --git a/chrome/renderer/printing/print_web_view_helper.h b/chrome/renderer/printing/print_web_view_helper.h
index f144adc45d02b52059541420eb40cbd3c5d76e8d..e443ff4b8c28472bfeaf5fec7bb86b9833284475 100644
--- a/chrome/renderer/printing/print_web_view_helper.h
+++ b/chrome/renderer/printing/print_web_view_helper.h
@@ -66,7 +66,19 @@ class PrintWebViewHelper
: public content::RenderViewObserver,
public content::RenderViewObserverTracker<PrintWebViewHelper> {
public:
- explicit PrintWebViewHelper(content::RenderView* render_view);
+
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+ virtual bool CancelPrerender(content::RenderView* render_view,
+ int routing_id) = 0;
+ };
+
+
+ explicit PrintWebViewHelper(content::RenderView* render_view,
Lei Zhang 2015/01/06 04:11:32 explicit no longer needed
dgn 2015/01/06 16:35:31 Done.
+ const bool out_of_process_pdf_enabled,
Vitaly Buka (NO REVIEWS) 2015/01/06 03:46:16 "const bool" -> "bool"
dgn 2015/01/06 16:35:31 Done.
+ const bool print_preview_disabled,
+ Delegate* delegate);
~PrintWebViewHelper() override;
// Disable print preview and switch to system dialog printing even if full
@@ -327,6 +339,11 @@ class PrintWebViewHelper
// True, when printing from print preview.
bool print_for_preview_;
+ // Whether the content to print could be nested in an iframe.
+ const bool out_of_process_pdf_enabled_;
+
+ Delegate* delegate_;
Lei Zhang 2015/01/06 04:11:32 This can be a Delegate* const
+
// Keeps track of the state of print preview between messages.
// TODO(vitalybuka): Create PrintPreviewContext when needed and delete after
// use. Now it's interaction with various messages is confusing.

Powered by Google App Engine
This is Rietveld 408576698