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

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

Issue 7001001: PrintPreview: Display print preview failed error message in the restored print preview tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index 4ee78d83955ab56699878be10c49f4b8d13551bd..91bb0838af5c5e9f69c7a16f701b0ed2ebd2ff17 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -275,8 +275,10 @@ void PrintPreviewHandler::HandleGetPrinters(const ListValue*) {
void PrintPreviewHandler::HandleGetPreview(const ListValue* args) {
TabContents* initiator_tab = GetInitiatorTab();
- if (!initiator_tab)
+ if (!initiator_tab) {
+ web_ui_->CallJavascriptFunction("printPreviewFailed");
return;
+ }
scoped_ptr<DictionaryValue> settings(GetSettingsDictionary(args));
if (!settings.get())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698