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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 const std::string GetErrorPageJs(); | 62 const std::string GetErrorPageJs(); |
63 | 63 |
64 // Returns a JavaScript blob for controlling the "in-progress" indicator when | 64 // Returns a JavaScript blob for controlling the "in-progress" indicator when |
65 // viewing a partially-distilled page. |is_last_page| indicates whether this is | 65 // viewing a partially-distilled page. |is_last_page| indicates whether this is |
66 // the last page of the article (i.e. loading indicator should be removed). | 66 // the last page of the article (i.e. loading indicator should be removed). |
67 const std::string GetToggleLoadingIndicatorJs(const bool is_last_page); | 67 const std::string GetToggleLoadingIndicatorJs(const bool is_last_page); |
68 | 68 |
69 // Returns the default CSS to be used for a viewer. | 69 // Returns the default CSS to be used for a viewer. |
70 const std::string GetCss(); | 70 const std::string GetCss(); |
71 | 71 |
| 72 // Returns the iOS specific CSS to be used for the distiller viewer. |
| 73 const std::string GetIOSCss(); |
| 74 |
72 // Returns the default JS to be used for a viewer. | 75 // Returns the default JS to be used for a viewer. |
73 const std::string GetJavaScript(); | 76 const std::string GetJavaScript(); |
74 | 77 |
75 // Based on the given path, calls into the DomDistillerServiceInterface for | 78 // Based on the given path, calls into the DomDistillerServiceInterface for |
76 // viewing distilled content based on the |path|. | 79 // viewing distilled content based on the |path|. |
77 scoped_ptr<ViewerHandle> CreateViewRequest( | 80 scoped_ptr<ViewerHandle> CreateViewRequest( |
78 DomDistillerServiceInterface* dom_distiller_service, | 81 DomDistillerServiceInterface* dom_distiller_service, |
79 const std::string& path, | 82 const std::string& path, |
80 ViewRequestDelegate* view_request_delegate, | 83 ViewRequestDelegate* view_request_delegate, |
81 const gfx::Size& render_view_size); | 84 const gfx::Size& render_view_size); |
82 | 85 |
83 // Returns JavaScript coresponding to setting the font family. | 86 // Returns JavaScript coresponding to setting the font family. |
84 const std::string GetDistilledPageFontFamilyJs( | 87 const std::string GetDistilledPageFontFamilyJs( |
85 DistilledPagePrefs::FontFamily font); | 88 DistilledPagePrefs::FontFamily font); |
86 | 89 |
87 // Returns JavaScript corresponding to setting a specific theme. | 90 // Returns JavaScript corresponding to setting a specific theme. |
88 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme); | 91 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme); |
89 | 92 |
90 } // namespace viewer | 93 } // namespace viewer |
91 | 94 |
92 } // namespace dom_distiller | 95 } // namespace dom_distiller |
93 | 96 |
94 #endif // COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ | 97 #endif // COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ |
OLD | NEW |