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

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

Issue 260073009: [dom_distiller] Add support for incremental viewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 61aac1481605c6839512b4173b30b2b2245f467a..bab3d6a4c140edd4d11fc7135246d9658713fbec 100644
--- a/components/dom_distiller/core/viewer.h
+++ b/components/dom_distiller/core/viewer.h
@@ -10,10 +10,12 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "base/strings/string16.h"
namespace dom_distiller {
class DistilledArticleProto;
+class DistilledPageProto;
class DomDistillerServiceInterface;
class ViewerHandle;
class ViewRequestDelegate;
@@ -23,7 +25,17 @@ namespace viewer {
// Returns a full HTML page based on the given |article_proto|. This is supposed
// to 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 GetUnsafeHtml(const DistilledArticleProto* article_proto);
+const std::string GetUnsafeArticleHtml(
+ const DistilledArticleProto* article_proto);
+
+const std::string GetUnsafePartialArticleHtml(
+ const DistilledPageProto* page_proto);
+
+const base::string16 GetUnsafeIncrementalDistilledPageJs(
+ const DistilledPageProto* page_proto,
+ const bool is_last_page);
+
+const base::string16 GetToggleLoadingIndicatorJs(const bool is_last_page);
// Returns a full HTML page which displays a generic error.
const std::string GetErrorPageHtml();
@@ -31,6 +43,8 @@ const std::string GetErrorPageHtml();
// Returns the default CSS to be used for a viewer.
const std::string GetCss();
+const std::string GetJavaScript();
+
// Based on the given path, calls into the DomDistillerServiceInterface for
// viewing distilled content based on the |path|.
scoped_ptr<ViewerHandle> CreateViewRequest(

Powered by Google App Engine
This is Rietveld 408576698