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

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

Issue 178303004: Add incremental updates for multipage distillation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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 | « components/dom_distiller/core/fake_distiller.cc ('k') | components/dom_distiller/core/task_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/task_tracker.h
diff --git a/components/dom_distiller/core/task_tracker.h b/components/dom_distiller/core/task_tracker.h
index 3c9effb35f2547374c9cb0ef89bc38e15e88fafd..42521e629888a6348012e0c3bf8087b4c5ebdb4c 100644
--- a/components/dom_distiller/core/task_tracker.h
+++ b/components/dom_distiller/core/task_tracker.h
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/memory/weak_ptr.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"
#include "components/dom_distiller/core/proto/distilled_page.pb.h"
@@ -44,6 +45,9 @@ class ViewRequestDelegate {
// when the corresponding ViewerHandle is destroyed (or when the
// DomDistillerService is destroyed).
virtual void OnArticleReady(const DistilledArticleProto* article_proto) = 0;
+
+ // Called when an article that is currently under distillation is updated.
+ virtual void OnArticleUpdated(ArticleDistillationUpdate article_update) = 0;
};
// A TaskTracker manages the various tasks related to viewing, saving,
@@ -90,8 +94,10 @@ class TaskTracker {
bool HasUrl(const GURL& url) const;
private:
- void OnDistilledDataReady(
+ void OnDistilledArticleReady(
scoped_ptr<DistilledArticleProto> distilled_article);
+ void OnArticleDistillationUpdated(
+ const ArticleDistillationUpdate& article_update);
// Posts a task to run DoSaveCallbacks with |distillation_succeeded|.
void ScheduleSaveCallbacks(bool distillation_succeeded);
« no previous file with comments | « components/dom_distiller/core/fake_distiller.cc ('k') | components/dom_distiller/core/task_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698