OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ |
6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "components/dom_distiller/core/article_entry.h" | 15 #include "components/dom_distiller/core/article_entry.h" |
16 | 16 |
17 class GURL; | 17 class GURL; |
18 | 18 |
19 namespace syncer { | 19 namespace syncer { |
20 class SyncableService; | 20 class SyncableService; |
21 } | 21 } |
22 | 22 |
23 namespace dom_distiller { | 23 namespace dom_distiller { |
24 | 24 |
25 class DistilledArticleProto; | 25 class DistilledArticleProto; |
| 26 class DistilledContentStore; |
26 class DistillerFactory; | 27 class DistillerFactory; |
27 class DomDistillerObserver; | 28 class DomDistillerObserver; |
28 class DomDistillerStoreInterface; | 29 class DomDistillerStoreInterface; |
29 class TaskTracker; | 30 class TaskTracker; |
30 class ViewerHandle; | 31 class ViewerHandle; |
31 class ViewRequestDelegate; | 32 class ViewRequestDelegate; |
32 | 33 |
33 // Service for interacting with the Dom Distiller. | 34 // Service for interacting with the Dom Distiller. |
34 // Construction, destruction, and usage of this service must happen on the same | 35 // Construction, destruction, and usage of this service must happen on the same |
35 // thread. Callbacks will be called on that same thread. | 36 // thread. Callbacks will be called on that same thread. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 109 |
109 TaskTracker* GetTaskTrackerForEntry(const ArticleEntry& entry) const; | 110 TaskTracker* GetTaskTrackerForEntry(const ArticleEntry& entry) const; |
110 | 111 |
111 // Gets the task tracker for the given |url| or |entry|. If no appropriate | 112 // Gets the task tracker for the given |url| or |entry|. If no appropriate |
112 // tracker exists, this will create one, initialize it, and add it to | 113 // tracker exists, this will create one, initialize it, and add it to |
113 // |tasks_|. | 114 // |tasks_|. |
114 TaskTracker* GetOrCreateTaskTrackerForUrl(const GURL& url); | 115 TaskTracker* GetOrCreateTaskTrackerForUrl(const GURL& url); |
115 TaskTracker* GetOrCreateTaskTrackerForEntry(const ArticleEntry& entry); | 116 TaskTracker* GetOrCreateTaskTrackerForEntry(const ArticleEntry& entry); |
116 | 117 |
117 scoped_ptr<DomDistillerStoreInterface> store_; | 118 scoped_ptr<DomDistillerStoreInterface> store_; |
| 119 scoped_ptr<DistilledContentStore> content_store_; |
118 scoped_ptr<DistillerFactory> distiller_factory_; | 120 scoped_ptr<DistillerFactory> distiller_factory_; |
119 | 121 |
120 typedef ScopedVector<TaskTracker> TaskList; | 122 typedef ScopedVector<TaskTracker> TaskList; |
121 TaskList tasks_; | 123 TaskList tasks_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(DomDistillerService); | 125 DISALLOW_COPY_AND_ASSIGN(DomDistillerService); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace dom_distiller | 128 } // namespace dom_distiller |
127 | 129 |
128 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ | 130 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_ |
OLD | NEW |