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

Unified Diff: chrome/browser/ui/webui/print_preview_ui.cc

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/ui/webui/print_preview_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_ui.cc
diff --git a/chrome/browser/ui/webui/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview_ui.cc
index 89bcab0bd9760b9878a2cc0afb779242bbf40abc..339a5067388ae5f9122bab8870fee0247749751a 100644
--- a/chrome/browser/ui/webui/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview_ui.cc
@@ -16,9 +16,9 @@
PrintPreviewUI::PrintPreviewUI(TabContents* contents)
: ChromeWebUI(contents),
initial_preview_start_time_(base::TimeTicks::Now()) {
- // PrintPreviewUI owns |handler|.
- PrintPreviewHandler* handler = new PrintPreviewHandler();
- AddMessageHandler(handler->Attach(this));
+ // WebUI owns |handler_|.
+ handler_ = new PrintPreviewHandler();
+ AddMessageHandler(handler_->Attach(this));
// Set up the chrome://print/ data source.
contents->profile()->GetChromeURLDataManager()->AddDataSource(
@@ -69,6 +69,10 @@ void PrintPreviewUI::OnPreviewDataIsAvailable(int expected_pages_count,
is_preview_modifiable, ui_identifier);
}
+void PrintPreviewUI::OnNavigation() {
+ handler_->OnNavigation();
+}
+
void PrintPreviewUI::OnFileSelectionCancelled() {
CallJavascriptFunction("fileSelectionCancelled");
}
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698