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

Unified Diff: chrome/renderer/print_web_view_helper.h

Issue 6533006: Print Preview: Hook up the print button to initiate printing without displaying a print dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed review comments. Created 9 years, 10 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 | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper.h
diff --git a/chrome/renderer/print_web_view_helper.h b/chrome/renderer/print_web_view_helper.h
index 61d0a2ff6c4e2770826f6ba0f7db4a003b5e105a..84b136cfe40440187ee2764270c8fcdc26b618f1 100644
--- a/chrome/renderer/print_web_view_helper.h
+++ b/chrome/renderer/print_web_view_helper.h
@@ -15,6 +15,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
#include "ui/gfx/size.h"
+class DictionaryValue;
+
namespace gfx {
class Size;
}
@@ -85,7 +87,11 @@ class PrintWebViewHelper : public RenderViewObserver ,
// Message handlers. Public for testing.
void OnPrintingDone(int document_cookie, bool success);
- void OnPrintForPrintPreview();
+
+ // Print the pages for print preview. Do not display the native print dialog
+ // for user settings. |job_settings| has new print job settings values.
+ void OnPrintForPrintPreview(const DictionaryValue& job_settings);
+
void OnPrintPages();
void OnPrintPreview();
void OnPrintNodeUnderContextMenu();
@@ -153,6 +159,11 @@ class PrintWebViewHelper : public RenderViewObserver ,
bool InitPrintSettings(WebKit::WebFrame* frame,
WebKit::WebNode* node);
+ // Update the current print settings with new |job_settings|. |job_settings|
+ // dictionary contains print job details such as printer name, number of
+ // copies, page range, etc.
+ bool UpdatePrintSettings(const DictionaryValue& job_settings);
+
// Get the default printer settings.
bool GetDefaultPrintSettings(WebKit::WebFrame* frame,
WebKit::WebNode* node,
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698