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

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

Issue 7818010: Print Preview: Populating print preview tab title as soon as it is known. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 9 years, 3 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_handler.h ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | 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 42597a5e30e44a4f877d48f3bd22df51c2e0138e..524412f4152e88281bb9c206b3094e1f8e515172 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -468,6 +468,8 @@ void PrintPreviewHandler::RegisterMessages() {
NewCallback(this, &PrintPreviewHandler::HandleCancelPendingPrintRequest));
web_ui_->RegisterMessageCallback("saveLastPrinter",
NewCallback(this, &PrintPreviewHandler::HandleSaveLastPrinter));
+ web_ui_->RegisterMessageCallback("getInitiatorTabTitle",
+ NewCallback(this, &PrintPreviewHandler::HandleGetInitiatorTabTitle));
}
TabContentsWrapper* PrintPreviewHandler::preview_tab_wrapper() const {
@@ -765,6 +767,12 @@ void PrintPreviewHandler::ReportStats() {
manage_printers_dialog_request_count_);
}
+void PrintPreviewHandler::HandleGetInitiatorTabTitle(
+ const ListValue* /*args*/) {
dpapad 2011/09/06 17:07:19 Using this format for unused parameters according
kmadhusu 2011/09/06 18:19:32 In this file, we don't follow that style in other
dpapad 2011/09/06 21:27:51 I changed all the method signatures (with unused p
+ PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(web_ui_);
+ print_preview_ui->SendInitiatorTabTitle();
+}
+
void PrintPreviewHandler::ActivateInitiatorTabAndClosePreviewTab() {
TabContentsWrapper* initiator_tab = GetInitiatorTab();
if (initiator_tab) {
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.h ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698