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

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

Issue 7365003: Print Preview: Make preview generation event driven to eliminate synchronous messages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: clang fix Created 9 years, 5 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 92822)
+++ chrome/browser/ui/webui/print_preview_handler.cc (working copy)
@@ -827,6 +827,11 @@
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/print_preview_message_handler.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