| Index: components/dom_distiller/core/viewer.h
|
| diff --git a/components/dom_distiller/core/viewer.h b/components/dom_distiller/core/viewer.h
|
| index 9e1ded3b26e983f9c6783c0b5be2121a5760e366..34514ae25c050bbf34451b139b9acb26b521c01a 100644
|
| --- a/components/dom_distiller/core/viewer.h
|
| +++ b/components/dom_distiller/core/viewer.h
|
| @@ -24,25 +24,22 @@ class ViewRequestDelegate;
|
|
|
| namespace viewer {
|
|
|
| -// Returns a full HTML page based on the given |article_proto|. This is supposed
|
| -// 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 DistilledPagePrefs::Theme theme,
|
| - const DistilledPagePrefs::FontFamily font_family);
|
| -
|
| -// Returns the base Viewer HTML page based on the given |page_proto|. This is
|
| +// Returns an HTML template page based on the given |page_proto| which provides
|
| +// basic information about the page (i.e. title, text direction, etc.). This is
|
| // supposed to be displayed to the end user. The returned HTML should be
|
| // considered unsafe, so callers must ensure rendering it does not compromise
|
| -// Chrome. The difference from |GetUnsafeArticleHtml| is that this can be used
|
| -// for displaying an in-flight distillation instead of waiting for the full
|
| -// article.
|
| -const std::string GetUnsafePartialArticleHtml(
|
| +// Chrome.
|
| +const std::string GetUnsafeArticleTemplateHtml(
|
| const DistilledPageProto* page_proto,
|
| const DistilledPagePrefs::Theme theme,
|
| const DistilledPagePrefs::FontFamily font_family);
|
|
|
| +// Returns the JavaScript to place a full article's HTML on the page. The
|
| +// returned HTML should be considered unsafe, so callers must ensure
|
| +// rendering it does not compromise Chrome.
|
| +const std::string GetUnsafeArticleContentJs(
|
| + const DistilledArticleProto* article_proto);
|
| +
|
| // 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
|
| // article. |is_last_page| indicates whether this is the last page of the
|
| @@ -51,6 +48,10 @@ const std::string GetUnsafeIncrementalDistilledPageJs(
|
| const DistilledPageProto* page_proto,
|
| const bool is_last_page);
|
|
|
| +// Returns a JavaScript blob for updating a view request with error page
|
| +// contents.
|
| +const std::string GetErrorPageJs();
|
| +
|
| // Returns a JavaScript blob for controlling the "in-progress" indicator when
|
| // viewing a partially-distilled page. |is_last_page| indicates whether this is
|
| // the last page of the article (i.e. loading indicator should be removed).
|
|
|