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

Unified Diff: ios/chrome/browser/dom_distiller/distiller_viewer.h

Issue 1071413003: IOS distiller common code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@superclass
Patch Set: Name changes from dependency Created 5 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
« no previous file with comments | « no previous file | ios/chrome/browser/dom_distiller/distiller_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/dom_distiller/distiller_viewer.h
diff --git a/ios/chrome/browser/dom_distiller/distiller_viewer.h b/ios/chrome/browser/dom_distiller/distiller_viewer.h
index d82275511c94dea15e0f96c5c2b49f94b836a95f..071a5afe14f5636e13656feca994714af39dffb7 100644
--- a/ios/chrome/browser/dom_distiller/distiller_viewer.h
+++ b/ios/chrome/browser/dom_distiller/distiller_viewer.h
@@ -5,7 +5,10 @@
#ifndef IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_
#define IOS_CHROME_BROWSER_DOM_DISTILLER_DISTILLER_VIEWER_H_
+#include <string>
+
#include "base/memory/scoped_ptr.h"
+#include "components/dom_distiller/core/dom_distiller_request_view_base.h"
#include "components/dom_distiller/core/task_tracker.h"
class GURL;
@@ -21,7 +24,7 @@ class DistilledPagePrefs;
// A very simple and naive implementation of the dom_distiller
// ViewRequestDelegate: From an URL it builds an HTML string and notifies when
// finished.
-class DistillerViewer : public dom_distiller::ViewRequestDelegate {
+class DistillerViewer : public DomDistillerRequestViewBase {
public:
typedef base::Callback<void(const GURL&, const std::string&)>
DistillationFinishedCallback;
@@ -31,20 +34,19 @@ class DistillerViewer : public dom_distiller::ViewRequestDelegate {
const DistillationFinishedCallback& callback);
~DistillerViewer() override;
- // ViewRequestDelegate.
- void OnArticleUpdated(
- dom_distiller::ArticleDistillationUpdate article_update) override {}
- void OnArticleReady(const DistilledArticleProto* article_proto) override;
+ void SendJavaScript(const std::string& buffer) override;
+
+ std::string getJsBuffer();
noyau (Ping after 24h) 2015/05/20 13:58:43 Should probably be GetJavaScriptBuffer() (Starts w
mdjones 2015/05/20 15:45:54 Done.
private:
// The url of the distilled page.
const GURL url_;
- // Callback to invoke when the page is finished.
- DistillationFinishedCallback callback_;
// Interface for accessing preferences for distilled pages.
scoped_ptr<DistilledPagePrefs> distilled_page_prefs_;
// Keeps the distiller going until the view is released.
scoped_ptr<dom_distiller::ViewerHandle> viewer_handle_;
+ // JavaScript buffer.
+ std::string js_buffer_;
DISALLOW_COPY_AND_ASSIGN(DistillerViewer);
};
« no previous file with comments | « no previous file | ios/chrome/browser/dom_distiller/distiller_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698