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

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

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: Addressed review comments 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.cc
diff --git a/chrome/browser/ui/webui/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview_ui.cc
index 58d5a2981d4add4feb9a21d69aec404c3e928c9d..f32668d2e5a93d2a8063db65e39edf47f74e1763 100644
--- a/chrome/browser/ui/webui/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview_ui.cc
@@ -54,9 +54,17 @@ void PrintPreviewUI::ClearAllPreviewData() {
print_preview_data_service()->RemoveEntry(preview_ui_addr_str_);
}
-void PrintPreviewUI::OnInitiatorTabClosed(
- const std::string& initiator_url) {
- StringValue initiator_tab_url(initiator_url);
+void PrintPreviewUI::SetInitiatorTabURL(const std::string& initiator_url) {
+ initiator_url_ = initiator_url;
+}
+
+void PrintPreviewUI::OnInitiatorTabCrashed() {
+ StringValue initiator_tab_url(initiator_url_);
+ CallJavascriptFunction("onInitiatorTabCrashed", initiator_tab_url);
+}
+
+void PrintPreviewUI::OnInitiatorTabClosed() {
+ StringValue initiator_tab_url(initiator_url_);
CallJavascriptFunction("onInitiatorTabClosed", initiator_tab_url);
}
@@ -114,8 +122,8 @@ void PrintPreviewUI::OnPreviewDataIsAvailable(int expected_pages_count,
ui_preview_request_id);
}
-void PrintPreviewUI::OnNavigation() {
- handler_->OnNavigation();
+void PrintPreviewUI::OnTabDestroyed() {
+ handler_->OnTabDestroyed();
}
void PrintPreviewUI::OnFileSelectionCancelled() {

Powered by Google App Engine
This is Rietveld 408576698