Chromium Code Reviews| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 void DomDistillerRequestViewBase::OnChangeTheme( | 94 void DomDistillerRequestViewBase::OnChangeTheme( |
| 95 DistilledPagePrefs::Theme new_theme) { | 95 DistilledPagePrefs::Theme new_theme) { |
| 96 SendJavaScript(viewer::GetDistilledPageThemeJs(new_theme)); | 96 SendJavaScript(viewer::GetDistilledPageThemeJs(new_theme)); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void DomDistillerRequestViewBase::OnChangeFontFamily( | 99 void DomDistillerRequestViewBase::OnChangeFontFamily( |
| 100 DistilledPagePrefs::FontFamily new_font) { | 100 DistilledPagePrefs::FontFamily new_font) { |
| 101 SendJavaScript(viewer::GetDistilledPageFontFamilyJs(new_font)); | 101 SendJavaScript(viewer::GetDistilledPageFontFamilyJs(new_font)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void DomDistillerRequestViewBase::OnChangeFontScaling( | |
| 105 float scaling) { | |
|
nyquist
2015/08/11 06:27:57
Nit: move one line up
wychen
2015/08/31 21:47:39
Done.
| |
| 106 SendJavaScript(viewer::GetDistilledPageFontScalingJs(scaling)); | |
| 107 } | |
| 108 | |
| 104 void DomDistillerRequestViewBase::TakeViewerHandle( | 109 void DomDistillerRequestViewBase::TakeViewerHandle( |
| 105 scoped_ptr<ViewerHandle> viewer_handle) { | 110 scoped_ptr<ViewerHandle> viewer_handle) { |
| 106 viewer_handle_ = viewer_handle.Pass(); | 111 viewer_handle_ = viewer_handle.Pass(); |
| 107 // Getting the viewer handle means this is not an error page, send | 112 // Getting the viewer handle means this is not an error page, send |
| 108 // the viewer JavaScript and show the loading indicator. | 113 // the viewer JavaScript and show the loading indicator. |
| 109 SendJavaScript(viewer::GetJavaScript()); | 114 SendJavaScript(viewer::GetJavaScript()); |
| 110 SendJavaScript(viewer::GetToggleLoadingIndicatorJs(false)); | 115 SendJavaScript(viewer::GetToggleLoadingIndicatorJs(false)); |
| 111 } | 116 } |
| 112 | 117 |
| 113 } // namespace dom_distiller | 118 } // namespace dom_distiller |
| OLD | NEW |