Index: components/dom_distiller/core/dom_distiller_request_view_base.cc |
diff --git a/components/dom_distiller/core/dom_distiller_request_view_base.cc b/components/dom_distiller/core/dom_distiller_request_view_base.cc |
index 70e7185ab0fe78a85bd2d8fc0919f899cccbb90b..911cfdd91dbc584bfaf8908f7f0ed81ac1a89a2e 100644 |
--- a/components/dom_distiller/core/dom_distiller_request_view_base.cc |
+++ b/components/dom_distiller/core/dom_distiller_request_view_base.cc |
@@ -32,7 +32,7 @@ DomDistillerRequestViewBase::~DomDistillerRequestViewBase() { |
void DomDistillerRequestViewBase::FlagAsErrorPage() { |
// Viewer handle is not passed to this in the case of error pages |
// so send all JavaScript now. |
- SendJavaScript(viewer::GetJavaScript()); |
+ SendCommonJavaScript(); |
SendJavaScript(viewer::GetErrorPageJs()); |
std::string title(l10n_util::GetStringUTF8( |
@@ -114,13 +114,23 @@ void DomDistillerRequestViewBase::OnChangeFontFamily( |
SendJavaScript(viewer::GetDistilledPageFontFamilyJs(new_font)); |
} |
+void DomDistillerRequestViewBase::OnChangeFontScaling(float scaling) { |
+ SendJavaScript(viewer::GetDistilledPageFontScalingJs(scaling)); |
+} |
+ |
void DomDistillerRequestViewBase::TakeViewerHandle( |
scoped_ptr<ViewerHandle> viewer_handle) { |
viewer_handle_ = viewer_handle.Pass(); |
// Getting the viewer handle means this is not an error page, send |
// the viewer JavaScript and show the loading indicator. |
- SendJavaScript(viewer::GetJavaScript()); |
+ SendCommonJavaScript(); |
SendJavaScript(viewer::GetToggleLoadingIndicatorJs(false)); |
} |
+void DomDistillerRequestViewBase::SendCommonJavaScript() { |
+ SendJavaScript(viewer::GetJavaScript()); |
+ SendJavaScript(viewer::GetDistilledPageFontScalingJs( |
+ distilled_page_prefs_->GetFontScaling())); |
+} |
+ |
} // namespace dom_distiller |