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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const std::string GetToggleLoadingIndicatorJs(const bool is_last_page); | 61 const std::string GetToggleLoadingIndicatorJs(const bool is_last_page); |
62 | 62 |
63 // Returns a full HTML page which displays a generic error. | 63 // Returns a full HTML page which displays a generic error. |
64 const std::string GetErrorPageHtml( | 64 const std::string GetErrorPageHtml( |
65 const DistilledPagePrefs::Theme theme, | 65 const DistilledPagePrefs::Theme theme, |
66 const DistilledPagePrefs::FontFamily font_family); | 66 const DistilledPagePrefs::FontFamily font_family); |
67 | 67 |
68 // Returns the default CSS to be used for a viewer. | 68 // Returns the default CSS to be used for a viewer. |
69 const std::string GetCss(); | 69 const std::string GetCss(); |
70 | 70 |
| 71 // Returns the default CSS to be used for a print preview viewer. |
| 72 const std::string GetPrintPreviewCss(); |
| 73 |
71 // Returns the default JS to be used for a viewer. | 74 // Returns the default JS to be used for a viewer. |
72 const std::string GetJavaScript(); | 75 const std::string GetJavaScript(); |
73 | 76 |
74 // Based on the given path, calls into the DomDistillerServiceInterface for | 77 // Based on the given path, calls into the DomDistillerServiceInterface for |
75 // viewing distilled content based on the |path|. | 78 // viewing distilled content based on the |path|. |
76 scoped_ptr<ViewerHandle> CreateViewRequest( | 79 scoped_ptr<ViewerHandle> CreateViewRequest( |
77 DomDistillerServiceInterface* dom_distiller_service, | 80 DomDistillerServiceInterface* dom_distiller_service, |
78 const std::string& path, | 81 const std::string& path, |
79 ViewRequestDelegate* view_request_delegate, | 82 ViewRequestDelegate* view_request_delegate, |
80 const gfx::Size& render_view_size); | 83 const gfx::Size& render_view_size); |
81 | 84 |
82 // Returns JavaScript coresponding to setting the font family. | 85 // Returns JavaScript coresponding to setting the font family. |
83 const std::string GetDistilledPageFontFamilyJs( | 86 const std::string GetDistilledPageFontFamilyJs( |
84 DistilledPagePrefs::FontFamily font); | 87 DistilledPagePrefs::FontFamily font); |
85 | 88 |
86 // Returns JavaScript corresponding to setting a specific theme. | 89 // Returns JavaScript corresponding to setting a specific theme. |
87 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme); | 90 const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme); |
88 | 91 |
| 92 const std::string GetUnsafePrintPreviewHtml( |
| 93 const DistilledArticleProto* article_proto, |
| 94 const DistilledPagePrefs::Theme theme, |
| 95 const DistilledPagePrefs::FontFamily font_family); |
89 } // namespace viewer | 96 } // namespace viewer |
90 | 97 |
91 } // namespace dom_distiller | 98 } // namespace dom_distiller |
92 | 99 |
93 #endif // COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ | 100 #endif // COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_ |
OLD | NEW |