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 #ifndef COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ |
6 #define COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "components/dom_distiller/core/distilled_page_prefs.h" | 13 #include "components/dom_distiller/core/distilled_page_prefs.h" |
14 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
15 | 15 |
16 namespace dom_distiller { | 16 namespace dom_distiller { |
17 | 17 |
18 class DistilledArticleProto; | 18 class DistilledArticleProto; |
19 class DistilledPageProto; | 19 class DistilledPageProto; |
20 class DomDistillerServiceInterface; | 20 class DomDistillerServiceInterface; |
21 class ViewerHandle; | 21 class ViewerHandle; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 const std::string GetLoadingImage(); | 72 const std::string GetLoadingImage(); |
73 | 73 |
74 // Returns the iOS specific CSS to be used for the distiller viewer. | 74 // Returns the iOS specific CSS to be used for the distiller viewer. |
75 const std::string GetIOSCss(); | 75 const std::string GetIOSCss(); |
76 | 76 |
77 // Returns the default JS to be used for a viewer. | 77 // Returns the default JS to be used for a viewer. |
78 const std::string GetJavaScript(); | 78 const std::string GetJavaScript(); |
79 | 79 |
80 // Based on the given path, calls into the DomDistillerServiceInterface for | 80 // Based on the given path, calls into the DomDistillerServiceInterface for |
81 // viewing distilled content based on the |path|. | 81 // viewing distilled content based on the |path|. |
82 scoped_ptr<ViewerHandle> CreateViewRequest( | 82 std::unique_ptr<ViewerHandle> CreateViewRequest( |
83 DomDistillerServiceInterface* dom_distiller_service, | 83 DomDistillerServiceInterface* dom_distiller_service, |
84 const std::string& path, | 84 const std::string& path, |
85 ViewRequestDelegate* view_request_delegate, | 85 ViewRequestDelegate* view_request_delegate, |
86 const gfx::Size& render_view_size); | 86 const gfx::Size& render_view_size); |
87 | 87 |
88 // Returns JavaScript corresponding to setting the font family. | 88 // Returns JavaScript corresponding to setting the font family. |
89 const std::string GetDistilledPageFontFamilyJs( | 89 const std::string GetDistilledPageFontFamilyJs( |
90 DistilledPagePrefs::FontFamily font); | 90 DistilledPagePrefs::FontFamily font); |
91 | 91 |
92 // Returns JavaScript corresponding to setting a specific theme. | 92 // Returns JavaScript corresponding to setting a specific theme. |
93 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme); | 93 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme); |
94 | 94 |
95 // Returns JavaScript corresponding to setting the font scaling. | 95 // Returns JavaScript corresponding to setting the font scaling. |
96 const std::string GetDistilledPageFontScalingJs(float scaling); | 96 const std::string GetDistilledPageFontScalingJs(float scaling); |
97 | 97 |
98 } // namespace viewer | 98 } // namespace viewer |
99 | 99 |
100 } // namespace dom_distiller | 100 } // namespace dom_distiller |
101 | 101 |
102 #endif // COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ | 102 #endif // COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ |
OLD | NEW |