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

Unified Diff: chrome/browser/printing/print_view_manager.h

Issue 7202012: Print Preview: Display a throbber when the user requests the system print (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 9 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/browser/printing/print_view_manager.h
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h
index 308400dba0323195c7feab8b33675c8640ceaa6a..684c5739e6df9728fe71ae192ed798db10faa12a 100644
--- a/chrome/browser/printing/print_view_manager.h
+++ b/chrome/browser/printing/print_view_manager.h
@@ -22,6 +22,7 @@ namespace printing {
class JobEventDetails;
class PrintJob;
class PrintJobWorkerOwner;
+class PrintViewManagerObserver;
// Manages the print commands in relation to a TabContents. TabContents
// delegates a few printing related commands to this instance.
@@ -50,6 +51,11 @@ class PrintViewManager : public NotificationObserver,
// Handles cancelled preview printing request.
void PreviewPrintingRequestCancelled();
+ // Sets |observer| as the current PrintViewManagerObserver. Pass in NULL to
+ // remove the current observer. |observer| may always be NULL, but |observer_|
+ // must be NULL if |observer| is non-NULL.
+ void set_observer(PrintViewManagerObserver* observer);
+
// PrintedPagesSource implementation.
virtual string16 RenderSourceName();
virtual GURL RenderSourceUrl();
@@ -71,6 +77,7 @@ class PrintViewManager : public NotificationObserver,
private:
// IPC Message handlers.
void OnDidGetPrintedPagesCount(int cookie, int number_pages);
+ void OnDidShowPrintDialog();
void OnDidPrintPage(const PrintHostMsg_DidPrintPage_Params& params);
void OnPrintingFailed(int cookie);
@@ -150,6 +157,10 @@ class PrintViewManager : public NotificationObserver,
bool is_title_overridden_;
string16 overridden_title_;
+ // Weak pointer to an observer that is notified when the print dialog is
+ // shown.
+ PrintViewManagerObserver* observer_;
+
DISALLOW_COPY_AND_ASSIGN(PrintViewManager);
};
« no previous file with comments | « chrome/browser/printing/print_preview_tab_controller.cc ('k') | chrome/browser/printing/print_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698