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

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

Issue 7550063: Print Preview: Handle a crashed initiator tab by showing a message in PP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a style issue Created 9 years, 4 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/ui/webui/print_preview_ui.h
diff --git a/chrome/browser/ui/webui/print_preview_ui.h b/chrome/browser/ui/webui/print_preview_ui.h
index 8492e8534f8c8039c44181cb0473b67f98e6cadc..1d89485163a61b6d1bdc2730b425a54cbae32046 100644
--- a/chrome/browser/ui/webui/print_preview_ui.h
+++ b/chrome/browser/ui/webui/print_preview_ui.h
@@ -37,6 +37,9 @@ class PrintPreviewUI : public ChromeWebUI {
// Clear the existing print preview data.
void ClearAllPreviewData();
+ // Setters
+ void SetInitiatorTabURL(const std::string& initiator_url);
+
// Notifies the Web UI that there is a print preview request. There should be
// a matching call to OnPreviewDataIsAvailable() or OnPrintPreviewFailed().
void OnPrintPreviewRequest();
@@ -62,7 +65,7 @@ class PrintPreviewUI : public ChromeWebUI {
// Notifies the Web UI that a navigation has occurred in this tab. This is the
Lei Zhang 2011/08/16 00:59:23 This comment is out of date.
kmadhusu 2011/08/16 01:31:37 Fixed.
// last chance to communicate with the source tab before the association is
// erased.
- void OnNavigation();
+ void OnTabDestroyed();
// Notifies the Web UI that the print preview failed to render.
void OnPrintPreviewFailed();
@@ -72,7 +75,10 @@ class PrintPreviewUI : public ChromeWebUI {
// Notifies the Web UI that initiator tab is closed, so we can disable all the
// controls that need the initiator tab for generating the preview data.
- void OnInitiatorTabClosed(const std::string& initiator_url);
+ void OnInitiatorTabClosed();
+
+ // Notifies the Web UI that the initiator tab has crashed.
+ void OnInitiatorTabCrashed();
// Notifies the Web UI renderer that file selection has been cancelled.
void OnFileSelectionCancelled();
@@ -102,6 +108,10 @@ class PrintPreviewUI : public ChromeWebUI {
// Document cookie from the initiator renderer.
int document_cookie_;
+ // Store the |initiator_url| in order to display an accurate error message
+ // when the initiator tab is closed/crashed.
+ std::string initiator_url_;
+
DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
};

Powered by Google App Engine
This is Rietveld 408576698