Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8291)

Unified Diff: components/dom_distiller/core/viewer.h

Issue 341563002: Theme Preferences for Distilled Pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor changes Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/dom_distiller/core/viewer.h
diff --git a/components/dom_distiller/core/viewer.h b/components/dom_distiller/core/viewer.h
index 98a7e998f8ebbd2e0028ffca808b50ef4c16078e..cf40736b55e4eb6ae1d7c65e568ef6a38b0c4830 100644
--- a/components/dom_distiller/core/viewer.h
+++ b/components/dom_distiller/core/viewer.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
+#include "components/dom_distiller/core/reader_mode_preferences.h"
nyquist 2014/06/27 20:48:27 Can you instead forward declare this in the header
smaslo 2014/06/30 17:57:15 The compiler doesn't allow forward declarations of
namespace dom_distiller {
@@ -26,7 +27,8 @@ namespace viewer {
// to be displayed to the end user. The returned HTML should be considered
// unsafe, so callers must ensure rendering it does not compromise Chrome.
const std::string GetUnsafeArticleHtml(
- const DistilledArticleProto* article_proto);
+ const DistilledArticleProto* article_proto,
+ const ReaderModePrefs::Theme theme);
// Returns the base Viewer HTML page based on the given |page_proto|. This is
// supposed to be displayed to the end user. The returned HTML should be
@@ -35,7 +37,7 @@ const std::string GetUnsafeArticleHtml(
// for displaying an in-flight distillation instead of waiting for the full
// article.
const std::string GetUnsafePartialArticleHtml(
- const DistilledPageProto* page_proto);
+ const DistilledPageProto* page_proto, const ReaderModePrefs::Theme theme);
// Returns a JavaScript blob for updating a partial view request with additional
// distilled content. Meant for use when viewing a slow or long multi-page
@@ -51,7 +53,7 @@ const std::string GetUnsafeIncrementalDistilledPageJs(
const std::string GetToggleLoadingIndicatorJs(const bool is_last_page);
// Returns a full HTML page which displays a generic error.
-const std::string GetErrorPageHtml();
+const std::string GetErrorPageHtml(const ReaderModePrefs::Theme theme);
// Returns the default CSS to be used for a viewer.
const std::string GetCss();
@@ -66,6 +68,9 @@ scoped_ptr<ViewerHandle> CreateViewRequest(
const std::string& path,
ViewRequestDelegate* view_request_delegate);
+// Returns the corresponding CSS class
+const char* GetBodyCssClass(ReaderModePrefs::Theme theme);
nyquist 2014/06/27 20:48:27 Could this return std::string? Also can this be co
smaslo 2014/06/30 17:57:15 Made std::string, but couldn't make it const. I t
+
} // namespace viewer
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698