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

Unified Diff: chrome/renderer/print_web_view_helper.h

Issue 8136027: Print Preview: Make print preview tab modal. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address preview tab navigation, cancelling print to pdf issues Created 9 years, 2 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.h
===================================================================
--- chrome/renderer/print_web_view_helper.h (revision 105366)
+++ chrome/renderer/print_web_view_helper.h (working copy)
@@ -21,6 +21,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
#include "ui/gfx/size.h"
+class MessageLoop;
struct PrintMsg_Print_Params;
struct PrintMsg_PrintPage_Params;
struct PrintMsg_PrintPages_Params;
@@ -297,6 +298,9 @@
// Returns true if print preview should continue, false on failure.
bool PreviewPageRendered(int page_number, printing::Metafile* metafile);
+ // Stop the nested message loop when print preview has finished.
+ void OnPrintPreviewDone();
+
WebKit::WebView* print_web_view_;
scoped_ptr<PrintMsg_PrintPages_Params> print_pages_params_;
@@ -374,10 +378,12 @@
// Setters
void set_generate_draft_pages(bool generate_draft_pages);
void set_error(enum PrintPreviewErrorBuckets error);
+ void set_message_loop(MessageLoop* message_loop);
// Getters
WebKit::WebFrame* frame() const;
const WebKit::WebNode& node() const;
+ MessageLoop* message_loop() const;
int total_page_count() const;
bool generate_draft_pages();
printing::PreviewMetafile* metafile() const;
@@ -404,6 +410,8 @@
scoped_ptr<printing::PreviewMetafile> metafile_;
scoped_ptr<PrintMsg_Print_Params> print_params_;
+ MessageLoop* message_loop_;
+
// Total page count in the renderer.
int total_page_count_;

Powered by Google App Engine
This is Rietveld 408576698