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

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

Issue 2780433002: add print to pdf for headless (Closed)
Patch Set: fix mac page setting Created 3 years, 8 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: components/printing/renderer/print_web_view_helper.h
diff --git a/components/printing/renderer/print_web_view_helper.h b/components/printing/renderer/print_web_view_helper.h
index d979333feb1fd72972fe4109e1afc061f49af2d1..3b3549531457d619ede75c0328b2c9d50bc87423 100644
--- a/components/printing/renderer/print_web_view_helper.h
+++ b/components/printing/renderer/print_web_view_helper.h
@@ -108,6 +108,10 @@ class PrintWebViewHelper
// Returns true if printing is overridden and the default behavior should be
// skipped for |frame|.
virtual bool OverridePrint(blink::WebLocalFrame* frame) = 0;
+
+#if defined(OS_MACOSX)
+ virtual bool UseSingleMetafile();
Lei Zhang 2017/04/06 08:08:42 Explain what this does.
jzfeng 2017/04/06 09:01:51 Done.
+#endif
};
PrintWebViewHelper(content::RenderFrame* render_frame,
@@ -283,8 +287,9 @@ class PrintWebViewHelper
// Prints the page listed in |params|.
#if defined(OS_MACOSX)
- void PrintPageInternal(const PrintMsg_PrintPage_Params& params,
- blink::WebLocalFrame* frame);
+ void PrintPagesInternal(const PrintMsg_PrintPage_Params& params,
+ blink::WebLocalFrame* frame,
+ std::vector<int> printed_pages);
Lei Zhang 2017/04/06 08:08:42 Pass by const ref.
jzfeng 2017/04/06 09:01:51 Done.
#else
void PrintPageInternal(const PrintMsg_PrintPage_Params& params,
blink::WebLocalFrame* frame,

Powered by Google App Engine
This is Rietveld 408576698