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

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

Issue 7621087: Print Preview: Go from event driven print preview back to print preview with sync messages. The s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove requested_page 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_handler.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_handler.cc (revision 97484)
+++ chrome/browser/ui/webui/print_preview_handler.cc (working copy)
@@ -477,13 +477,18 @@
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);
kmadhusu 2011/08/19 19:51:03 how about OnPrintPreviewRequest => UpdatePreviewRe
Lei Zhang 2011/08/19 22:50:28 Most of the print preview UI methods are in the fo
+ settings->SetString(printing::kPreviewUIAddr,
kmadhusu 2011/08/19 19:51:03 Add a comment on why you are adding this UI addres
Lei Zhang 2011/08/19 22:50:28 Done.
+ 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_) {
@@ -874,11 +879,6 @@
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(initiator_tab);
wrapper->print_view_manager()->set_observer(NULL);
kmadhusu 2011/08/19 19:51:03 Do you still need "OnTabDestroyed" function? Initi
Lei Zhang 2011/08/19 22:50:28 I believe it's still needed for http://crbug.com/8
-
- // 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,

Powered by Google App Engine
This is Rietveld 408576698