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

Unified Diff: chrome/browser/ui/webui/print_preview_handler.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
« no previous file with comments | « chrome/browser/resources/webui.css ('k') | chrome/browser/ui/webui/print_preview_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_handler.h
diff --git a/chrome/browser/ui/webui/print_preview_handler.h b/chrome/browser/ui/webui/print_preview_handler.h
index 04e12a6b3cb4bccdf95aca617bd08f1fddfd18aa..651a70fdfbccd8f76cc61522898a9140ff8b4600 100644
--- a/chrome/browser/ui/webui/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview_handler.h
@@ -8,6 +8,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/printing/print_view_manager_observer.h"
#include "chrome/browser/ui/shell_dialogs.h"
#include "content/browser/webui/web_ui.h"
@@ -20,10 +21,11 @@ namespace printing {
class PrintBackend;
}
-// The handler for Javascript messages related to the "print preview" dialog.
+// The handler for Javascript messages related to the print preview dialog.
class PrintPreviewHandler : public WebUIMessageHandler,
public base::SupportsWeakPtr<PrintPreviewHandler>,
- public SelectFileDialog::Listener {
+ public SelectFileDialog::Listener,
+ public printing::PrintViewManagerObserver {
public:
PrintPreviewHandler();
virtual ~PrintPreviewHandler();
@@ -35,9 +37,17 @@ class PrintPreviewHandler : public WebUIMessageHandler,
virtual void FileSelected(const FilePath& path, int index, void* params);
virtual void FileSelectionCanceled(void* params);
+ // PrintViewManagerObserver implementation.
+ virtual void OnPrintDialogShown();
+
// Displays a modal dialog, prompting the user to select a file.
void SelectFile(const FilePath& default_path);
+ // Called when the print preview tab navigates. This is the last time this
+ // this object has access to the PrintViewManager in order to disconnect the
+ // observer.
+ void OnNavigation();
+
private:
friend class PrintSystemTaskProxy;
« no previous file with comments | « chrome/browser/resources/webui.css ('k') | chrome/browser/ui/webui/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698