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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_distiller.cc

Issue 1920563002: Only trigger navigation in distiller if in print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 | « no previous file | components/dom_distiller/core/javascript/dom_distiller_viewer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview/print_preview_distiller.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_distiller.cc b/chrome/browser/ui/webui/print_preview/print_preview_distiller.cc
index 6dc6db85ded55449c6c8878d80e4c6678a2554e5..f847549a58de8d7e37b22da91962a1d891a4bc58 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_distiller.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_distiller.cc
@@ -136,6 +136,14 @@ class PrintPreviewDistiller::WebContentsDelegateImpl
render_frame_host->GetRoutingID(), true));
}
+ void DidFinishLoad(content::RenderFrameHost* render_frame_host,
+ const GURL& validated_url) override {
+ // Notify distiller that print preview is using it.
+ dom_distiller::RunIsolatedJavaScript(
+ web_contents()->GetMainFrame(),
+ "var isPrintPreviewDistiller = true;");
+ }
+
void DoPrintPreview() {
RenderViewHost* rvh = web_contents()->GetRenderViewHost();
rvh->Send(new PrintMsg_InitiatePrintPreview(rvh->GetRoutingID(), false));
« no previous file with comments | « no previous file | components/dom_distiller/core/javascript/dom_distiller_viewer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698