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

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

Issue 260073009: [dom_distiller] Add support for incremental viewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: is_in_page 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/fake_distiller.h
diff --git a/components/dom_distiller/core/fake_distiller.h b/components/dom_distiller/core/fake_distiller.h
index 8a3dc361dc60e4eece9db42ec496bcebdf91d6a4..9b180eec0080d9dbdb49764ed60e39c51a9491ca 100644
--- a/components/dom_distiller/core/fake_distiller.h
+++ b/components/dom_distiller/core/fake_distiller.h
@@ -13,6 +13,10 @@
class GURL;
+namespace content {
+class MessageLoopRunner;
+}
+
namespace dom_distiller {
namespace test {
@@ -32,6 +36,8 @@ class FakeDistiller : public Distiller {
// immediately be posted to execute the callback with a simple
// DistilledArticleProto.
explicit FakeDistiller(bool execute_callback);
+ explicit FakeDistiller(bool execute_callback,
+ content::MessageLoopRunner* runner);
virtual ~FakeDistiller();
MOCK_METHOD0(Die, void());
@@ -42,6 +48,7 @@ class FakeDistiller : public Distiller {
const DistillationUpdateCallback& page_callback) OVERRIDE;
void RunDistillerCallback(scoped_ptr<DistilledArticleProto> proto);
nyquist 2014/05/13 05:01:15 What about renaming this to RunDistillerFinishedCa
Yaron 2014/05/14 17:42:33 Follow-on?
+ void RunDistillerUpdateCallback(const ArticleDistillationUpdate& update);
GURL GetUrl() { return url_; }
@@ -57,8 +64,9 @@ class FakeDistiller : public Distiller {
GURL url_;
DistillationFinishedCallback article_callback_;
DistillationUpdateCallback page_callback_;
-
bool destruction_allowed_;
+ // Used to notify when distillation is complete.
+ content::MessageLoopRunner* runner_;
};
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698