OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/viewer.h" | 5 #include "components/dom_distiller/core/viewer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 | 296 |
297 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme) { | 297 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme) { |
298 return "useTheme('" + GetJsTheme(theme) + "');"; | 298 return "useTheme('" + GetJsTheme(theme) + "');"; |
299 } | 299 } |
300 | 300 |
301 const std::string GetDistilledPageFontFamilyJs( | 301 const std::string GetDistilledPageFontFamilyJs( |
302 DistilledPagePrefs::FontFamily font_family) { | 302 DistilledPagePrefs::FontFamily font_family) { |
303 return "useFontFamily('" + GetJsFontFamily(font_family) + "');"; | 303 return "useFontFamily('" + GetJsFontFamily(font_family) + "');"; |
304 } | 304 } |
305 | 305 |
306 const std::string GetDistilledPageFontScalingJs( | |
307 float scaling) { | |
308 std::stringstream ss; | |
cjhopman
2015/07/17 20:28:04
maybe:
return "useFontScaling(" + base::DoubleToS
wychen
2015/07/31 21:03:37
Done.
| |
309 ss << "useFontScaling(" << scaling << ");"; | |
310 return ss.str(); | |
311 } | |
312 | |
306 } // namespace viewer | 313 } // namespace viewer |
307 | 314 |
308 } // namespace dom_distiller | 315 } // namespace dom_distiller |
OLD | NEW |