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

Unified Diff: chrome/renderer/mock_render_thread.h

Issue 7365003: Print Preview: Make preview generation event driven to eliminate synchronous messages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: clang fix Created 9 years, 5 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/print_messages.h ('k') | chrome/renderer/mock_render_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/mock_render_thread.h
===================================================================
--- chrome/renderer/mock_render_thread.h (revision 92822)
+++ chrome/renderer/mock_render_thread.h (working copy)
@@ -83,8 +83,8 @@
// False if the user decides to cancel.
void set_print_dialog_user_response(bool response);
- // Set to true to simulate canceling of a print preview.
- void set_cancel_print_preview(bool cancel);
+ // Get the number of pages to generate for print preview.
+ int print_preview_pages_remaining();
private:
// This function operates as a regular IPC listener.
@@ -124,7 +124,8 @@
void OnDidGetPrintedPagesCount(int cookie, int number_pages);
void OnDidPrintPage(const PrintHostMsg_DidPrintPage_Params& params);
- void OnDidPreviewPage(int page_number, bool* cancel);
+ void OnDidGetPreviewPageCount(int document_cookie, int number_pages);
+ void OnDidPreviewPage(int page_number);
// For print preview, PrintWebViewHelper will update settings.
void OnUpdatePrintSettings(int document_cookie,
@@ -152,8 +153,8 @@
// True to simulate user clicking print. False to cancel.
bool print_dialog_user_response_;
- // True to simulate cancelling a print preview.
- bool cancel_print_preview_;
+ // Number of pages to generate for print preview.
+ int print_preview_pages_remaining_;
};
#endif // CHROME_RENDERER_MOCK_RENDER_THREAD_H_
« no previous file with comments | « chrome/common/print_messages.h ('k') | chrome/renderer/mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698