diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 02:47:26 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 02:47:26 +0000 |
commit | 8650f3a447188c938835e1aee03def923f59fcd0 (patch) | |
tree | 22138e0e2bf2d02784ccbacdf75c4844e79d96fe /chrome/renderer/mock_render_thread.h | |
parent | 6ceb72b2e67330e9caa3eaef208abff4f6e6eeb2 (diff) | |
download | chromium_src-8650f3a447188c938835e1aee03def923f59fcd0.zip chromium_src-8650f3a447188c938835e1aee03def923f59fcd0.tar.gz chromium_src-8650f3a447188c938835e1aee03def923f59fcd0.tar.bz2 |
Print Preview: Make preview generation event driven to eliminate synchronous messages.
BUG=89069
TEST=Print preview still works.
Review URL: http://codereview.chromium.org/7365003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/mock_render_thread.h')
-rw-r--r-- | chrome/renderer/mock_render_thread.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/renderer/mock_render_thread.h b/chrome/renderer/mock_render_thread.h index 3b359cf..1d2036b 100644 --- a/chrome/renderer/mock_render_thread.h +++ b/chrome/renderer/mock_render_thread.h @@ -83,8 +83,8 @@ class MockRenderThread : public RenderThreadBase { // 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 @@ class MockRenderThread : public RenderThreadBase { 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 @@ class MockRenderThread : public RenderThreadBase { // 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_ |