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

Side by Side Diff: components/dom_distiller/core/dom_distiller_request_view_base.cc

Issue 1225183002: Font size in DomDistiller prefs syncs with local scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: keep focus when useFontScaling() is called, add tests Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/dom_distiller/core/dom_distiller_request_view_base.h" 5 #include "components/dom_distiller/core/dom_distiller_request_view_base.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void DomDistillerRequestViewBase::OnChangeTheme( 102 void DomDistillerRequestViewBase::OnChangeTheme(
103 DistilledPagePrefs::Theme new_theme) { 103 DistilledPagePrefs::Theme new_theme) {
104 SendJavaScript(viewer::GetDistilledPageThemeJs(new_theme)); 104 SendJavaScript(viewer::GetDistilledPageThemeJs(new_theme));
105 } 105 }
106 106
107 void DomDistillerRequestViewBase::OnChangeFontFamily( 107 void DomDistillerRequestViewBase::OnChangeFontFamily(
108 DistilledPagePrefs::FontFamily new_font) { 108 DistilledPagePrefs::FontFamily new_font) {
109 SendJavaScript(viewer::GetDistilledPageFontFamilyJs(new_font)); 109 SendJavaScript(viewer::GetDistilledPageFontFamilyJs(new_font));
110 } 110 }
111 111
112 void DomDistillerRequestViewBase::OnChangeFontScaling(
113 float scaling) {
114 SendJavaScript(viewer::GetDistilledPageFontScalingJs(scaling));
115 }
116
112 void DomDistillerRequestViewBase::TakeViewerHandle( 117 void DomDistillerRequestViewBase::TakeViewerHandle(
113 scoped_ptr<ViewerHandle> viewer_handle) { 118 scoped_ptr<ViewerHandle> viewer_handle) {
114 viewer_handle_ = viewer_handle.Pass(); 119 viewer_handle_ = viewer_handle.Pass();
115 // Getting the viewer handle means this is not an error page, show the 120 // Getting the viewer handle means this is not an error page, show the
116 // loading indicator. 121 // loading indicator.
117 SendJavaScript(viewer::GetToggleLoadingIndicatorJs(false)); 122 SendJavaScript(viewer::GetToggleLoadingIndicatorJs(false));
118 } 123 }
119 124
120 } // namespace dom_distiller 125 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698