OLD | NEW |
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 Loading... |
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 |
OLD | NEW |