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

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

Issue 7747033: Merge 97702, 97820, 97976 (Closed) Base URL: svn://chrome-svn/chrome/branches/835/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
« no previous file with comments | « chrome/browser/printing/printing_message_filter.cc ('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
===================================================================
--- chrome/browser/ui/webui/print_preview_handler.cc (revision 98330)
+++ chrome/browser/ui/webui/print_preview_handler.cc (working copy)
@@ -473,13 +473,21 @@
scoped_ptr<DictionaryValue> settings(GetSettingsDictionary(args));
if (!settings.get())
return;
+ int request_id = -1;
+ if (!settings->GetInteger(printing::kPreviewRequestID, &request_id))
+ return;
+ PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(web_ui_);
+ print_preview_ui->OnPrintPreviewRequest(request_id);
+ // Add an additional key in order to identify |print_preview_ui| later on
+ // when calling PrintPreviewUI::GetCurrentPrintPreviewStatus() on the IO
+ // thread.
+ settings->SetString(printing::kPreviewUIAddr,
+ print_preview_ui->GetPrintPreviewUIAddress());
+
// Increment request count.
++regenerate_preview_request_count_;
- PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(web_ui_);
- print_preview_ui->OnPrintPreviewRequest();
-
TabContents* initiator_tab = GetInitiatorTab();
if (!initiator_tab) {
if (!reported_failed_preview_) {
@@ -837,11 +845,6 @@
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(initiator_tab);
wrapper->print_view_manager()->set_observer(NULL);
-
- // Tell the initiator tab to stop rendering the print preview, if any,
- // since the preview tab is gone.
- RenderViewHost* rvh = initiator_tab->render_view_host();
- rvh->Send(new PrintMsg_AbortPreview(rvh->routing_id()));
}
void PrintPreviewHandler::FileSelected(const FilePath& path,
« no previous file with comments | « chrome/browser/printing/printing_message_filter.cc ('k') | chrome/browser/ui/webui/print_preview_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698