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

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

Issue 266073003: Add support for distilling current WebContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile on Windows and rebased to ensure mac build works too Created 6 years, 7 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/distiller_page.h
diff --git a/components/dom_distiller/core/distiller_page.h b/components/dom_distiller/core/distiller_page.h
index a30d5e79d67e2f71f0ec41ce3ea23d820799188b..57339b35af8672e5fba35192c4f7c4c3a4be0dcb 100644
--- a/components/dom_distiller/core/distiller_page.h
+++ b/components/dom_distiller/core/distiller_page.h
@@ -28,6 +28,11 @@ struct DistilledPageInfo {
DISALLOW_COPY_AND_ASSIGN(DistilledPageInfo);
};
+class SourcePageHandle {
+ public:
+ virtual ~SourcePageHandle() {}
+};
+
// Injects JavaScript into a page, and uses it to extract and return long-form
// content. The class can be reused to load and distill multiple pages,
// following the state transitions described along with the class's states.
@@ -59,10 +64,6 @@ class DistillerPage {
// should be the same regardless of the DistillerPage implementation.
virtual void DistillPageImpl(const GURL& url, const std::string& script) = 0;
- // Called by |ExecuteJavaScript| to carry out platform-specific instructions
- // to inject and execute JavaScript within the context of the loaded page.
- //virtual void ExecuteJavaScriptImpl() = 0;
-
private:
bool ready_;
DistillerPageCallback distiller_page_callback_;
@@ -78,6 +79,8 @@ class DistillerPageFactory {
// should be very cheap, since the pages can be thrown away without being
// used.
virtual scoped_ptr<DistillerPage> CreateDistillerPage() const = 0;
+ virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle(
+ scoped_ptr<SourcePageHandle> handle) const = 0;
};
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698