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

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: '' 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 192611bc16a2ede8d125b3838ad002fd82ade6d7..f524f376934a03da673f7fe7a260dc33cc8a5655 100644
--- a/chrome/browser/ui/webui/print_preview_ui.h
+++ b/chrome/browser/ui/webui/print_preview_ui.h
@@ -36,6 +36,9 @@ class PrintPreviewUI : public ChromeWebUI {
// Clear the existing print preview data.
void ClearAllPreviewData();
+ // Setters
+ void SetInitiatorTabURL(const std::string& initiator_url);
+
// Notify the Web UI that there is a print preview request.
// There should be a matching call to OnPreviewDataIsAvailable() or
// OnPrintPreviewFailed().
@@ -76,7 +79,10 @@ class PrintPreviewUI : public ChromeWebUI {
// the controls that need the initiator tab for generating the preview data.
// |initiator_tab_url| is passed in order to display a more accurate error
// message.
- void OnInitiatorTabClosed(const std::string& initiator_tab_url);
+ void OnInitiatorTabClosed();
+
+ // Notifies the Web UI that the initiator tab has crashed.
+ void OnInitiatorTabCrashed();
// Notify the Web UI renderer that file selection has been cancelled.
void OnFileSelectionCancelled();
@@ -106,6 +112,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