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

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

Issue 430473007: Font Family Preferences for Distilled Pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: synced Created 6 years, 4 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
« no previous file with comments | « components/dom_distiller/core/font_family_list.h ('k') | components/dom_distiller/core/viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/viewer.h
diff --git a/components/dom_distiller/core/viewer.h b/components/dom_distiller/core/viewer.h
index 5812f8cda30f6a7ed2e3b712dc4bf502cac69b68..45b7e95e867d39bb40bcdbd62ec6be4ca2832db7 100644
--- a/components/dom_distiller/core/viewer.h
+++ b/components/dom_distiller/core/viewer.h
@@ -29,7 +29,8 @@ namespace viewer {
// unsafe, so callers must ensure rendering it does not compromise Chrome.
const std::string GetUnsafeArticleHtml(
const DistilledArticleProto* article_proto,
- const DistilledPagePrefs::Theme theme);
+ const DistilledPagePrefs::Theme theme,
+ const DistilledPagePrefs::FontFamily font_family);
// 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
@@ -39,7 +40,8 @@ const std::string GetUnsafeArticleHtml(
// article.
const std::string GetUnsafePartialArticleHtml(
const DistilledPageProto* page_proto,
- const DistilledPagePrefs::Theme theme);
+ const DistilledPagePrefs::Theme theme,
+ const DistilledPagePrefs::FontFamily font_family);
// 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
@@ -55,7 +57,9 @@ 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 DistilledPagePrefs::Theme theme);
+const std::string GetErrorPageHtml(
+ const DistilledPagePrefs::Theme theme,
+ const DistilledPagePrefs::FontFamily font_family);
// Returns the default CSS to be used for a viewer.
const std::string GetCss();
@@ -71,6 +75,10 @@ scoped_ptr<ViewerHandle> CreateViewRequest(
ViewRequestDelegate* view_request_delegate,
const gfx::Size& render_view_size);
+// Returns JavaScript coresponding to setting the font family.
+const std::string GetDistilledPageFontFamilyJs(
+ DistilledPagePrefs::FontFamily font);
+
// Returns JavaScript corresponding to setting a specific theme.
const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme);
« no previous file with comments | « components/dom_distiller/core/font_family_list.h ('k') | components/dom_distiller/core/viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698