Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc |
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc |
index cf0ab046dec1e896d7dc2182fc19bcf556781aa2..52bdfc54c40490e734b67e5a58084d887a5c8554 100644 |
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc |
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc |
@@ -1292,20 +1292,18 @@ void PrintPreviewHandler::SendInitialSettings( |
web_ui()->CallJavascriptFunction("setInitialSettings", initial_settings); |
WebContents* initiator = GetInitiator(); |
- if (initiator && cmdline->HasSwitch(switches::kEnableDomDistiller) && |
+ if (initiator && |
+ !(cmdline->HasSwitch(switches::kDisablePrintPreviewSimplify)) && |
dom_distiller::url_utils::IsUrlDistillable( |
initiator->GetLastCommittedURL())) { |
- dom_distiller::IsDistillablePage( |
- initiator, false, |
- base::Bind(&PrintPreviewHandler::HandleIsPageDistillableResult, |
- weak_factory_.GetWeakPtr())); |
+ web_ui()->CallJavascriptFunction("allowDistillPage"); |
} |
} |
void PrintPreviewHandler::HandleIsPageDistillableResult(bool distillable) { |
Vitaly Buka (NO REVIEWS)
2015/10/29 18:44:01
Please remove HandleIsPageDistillableResult as unu
mvendramini_hp
2015/10/29 18:52:32
Done.
|
VLOG(1) << "Distillable page detection finished"; |
if (distillable) |
- web_ui()->CallJavascriptFunction("detectDistillablePage"); |
+ web_ui()->CallJavascriptFunction("allowDistillPage"); |
} |
void PrintPreviewHandler::ClosePreviewDialog() { |