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

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: rebase 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..62cbcd7359bc3eb2b3b4a3e659de68f7258eb53c 100644
--- a/components/dom_distiller/core/fake_distiller.h
+++ b/components/dom_distiller/core/fake_distiller.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_H_
#define COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_H_
+#include "base/callback.h"
#include "components/dom_distiller/core/article_distillation_update.h"
#include "components/dom_distiller/core/article_entry.h"
#include "components/dom_distiller/core/distiller.h"
@@ -32,6 +33,10 @@ class FakeDistiller : public Distiller {
// immediately be posted to execute the callback with a simple
// DistilledArticleProto.
explicit FakeDistiller(bool execute_callback);
+ // TODO(yfriedman): Drop execute_callback from this and give the option of
+ // "auto-distilling" or calling the provided closure.
+ explicit FakeDistiller(bool execute_callback,
+ const base::Closure& distillation_initiated_callback);
virtual ~FakeDistiller();
MOCK_METHOD0(Die, void());
@@ -42,6 +47,7 @@ class FakeDistiller : public Distiller {
const DistillationUpdateCallback& page_callback) OVERRIDE;
void RunDistillerCallback(scoped_ptr<DistilledArticleProto> proto);
+ void RunDistillerUpdateCallback(const ArticleDistillationUpdate& update);
GURL GetUrl() { return url_; }
@@ -57,8 +63,9 @@ class FakeDistiller : public Distiller {
GURL url_;
DistillationFinishedCallback article_callback_;
DistillationUpdateCallback page_callback_;
-
bool destruction_allowed_;
+ // Used to notify when distillation is complete.
+ base::Closure distillation_initiated_callback_;
};
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698