| 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,
|
|
|