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

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

Issue 517193003: More System Dialog printing code disabled on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@522493002
Patch Set: Mon Sep 8 01:10:20 PDT 2014 Created 6 years, 3 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.cc
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc
index db73c37b671a68dc7e51984a865cf8c0f1daaa67..d3807778aa7861e1d28c7a9cf1917d12eb782fa4 100644
--- a/chrome/renderer/printing/print_web_view_helper.cc
+++ b/chrome/renderer/printing/print_web_view_helper.cc
@@ -834,8 +834,10 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PrintWebViewHelper, message)
+#if !defined(DISABLE_BASIC_PRINTING)
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
+#endif // !DISABLE_BASIC_PRINTING
IPC_MESSAGE_HANDLER(PrintMsg_InitiatePrintPreview, OnInitiatePrintPreview)
IPC_MESSAGE_HANDLER(PrintMsg_PrintPreview, OnPrintPreview)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForPrintPreview, OnPrintForPrintPreview)
@@ -932,6 +934,7 @@ bool PrintWebViewHelper::GetPrintFrame(blink::WebLocalFrame** frame) {
return true;
}
+#if !defined(DISABLE_BASIC_PRINTING)
void PrintWebViewHelper::OnPrintPages() {
blink::WebLocalFrame* frame;
if (GetPrintFrame(&frame))
@@ -944,9 +947,9 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
NOTREACHED();
return;
}
-
Print(frame, print_preview_context_.source_node());
}
+#endif // !DISABLE_BASIC_PRINTING
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points,
@@ -1223,6 +1226,7 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
print_node_in_progress_ = false;
}
+#if !defined(DISABLE_BASIC_PRINTING)
void PrintWebViewHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node) {
// If still not finished with earlier print request simply ignore.
@@ -1256,6 +1260,7 @@ void PrintWebViewHelper::Print(blink::WebLocalFrame* frame,
DidFinishPrinting(FAIL_PRINT);
}
}
+#endif // !DISABLE_BASIC_PRINTING
void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
switch (result) {
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper.h ('k') | chrome/renderer/printing/print_web_view_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698