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

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 10483006: Print support for Windows Metro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Working version Created 8 years, 6 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/print_web_view_helper.cc
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index bfcf5f9d5f9029a138a442e4acbb4de13654f243..8684fd8d512ec33ee2c679a01af4a8de2bccdc52 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -832,6 +832,7 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
ResetScriptedPrintCount)
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
SetScriptedPrintBlocked)
+ IPC_MESSAGE_HANDLER(PrintMsg_PrintForFile, OnPrintForFile)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -907,6 +908,10 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
Print(frame, print_preview_context_.node());
}
+void PrintWebViewHelper::OnPrintForFile() {
+ OnPrintPages();
MAD 2012/06/15 02:54:29 To be removed...
MAD 2012/06/28 15:48:14 Done.
+}
+
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
const printing::PageSizeMargins& page_layout_in_points,
gfx::Size* page_size,
@@ -1217,11 +1222,11 @@ void PrintWebViewHelper::Print(WebKit::WebFrame* frame,
}
// Ask the browser to show UI to retrieve the final print settings.
- if (!GetPrintSettingsFromUser(frame, node, expected_page_count,
- use_browser_overlays)) {
- DidFinishPrinting(OK); // Release resources and fail silently.
- return;
- }
+// if (!GetPrintSettingsFromUser(frame, node, expected_page_count,
MAD 2012/06/15 02:54:29 Need to fix this....
MAD 2012/06/28 15:48:14 Done.
+// use_browser_overlays)) {
+// DidFinishPrinting(OK); // Release resources and fail silently.
+// return;
+// }
// Render Pages for printing.
if (!RenderPagesForPrint(frame, node)) {

Powered by Google App Engine
This is Rietveld 408576698