| 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_TASK_TRACKER_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_TASK_TRACKER_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_CORE_TASK_TRACKER_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CORE_TASK_TRACKER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 typedef base::Callback< | 75 typedef base::Callback< |
| 76 void(const ArticleEntry&, const DistilledArticleProto*, bool)> | 76 void(const ArticleEntry&, const DistilledArticleProto*, bool)> |
| 77 SaveCallback; | 77 SaveCallback; |
| 78 | 78 |
| 79 TaskTracker(const ArticleEntry& entry, | 79 TaskTracker(const ArticleEntry& entry, |
| 80 CancelCallback callback, | 80 CancelCallback callback, |
| 81 DistilledContentStore* content_store); | 81 DistilledContentStore* content_store); |
| 82 ~TaskTracker(); | 82 ~TaskTracker(); |
| 83 | 83 |
| 84 // |factory| will not be stored after this call. | 84 // |factory| will not be stored after this call. |
| 85 void StartDistiller(DistillerFactory* factory); | 85 void StartDistiller(DistillerFactory* factory, |
| 86 scoped_ptr<DistillerPage> distiller_page); |
| 86 void StartBlobFetcher(); | 87 void StartBlobFetcher(); |
| 87 | 88 |
| 88 void AddSaveCallback(const SaveCallback& callback); | 89 void AddSaveCallback(const SaveCallback& callback); |
| 89 | 90 |
| 90 void CancelSaveCallbacks(); | 91 void CancelSaveCallbacks(); |
| 91 | 92 |
| 92 // The ViewerHandle should be destroyed before the ViewRequestDelegate. | 93 // The ViewerHandle should be destroyed before the ViewRequestDelegate. |
| 93 scoped_ptr<ViewerHandle> AddViewer(ViewRequestDelegate* delegate); | 94 scoped_ptr<ViewerHandle> AddViewer(ViewRequestDelegate* delegate); |
| 94 | 95 |
| 95 const std::string& GetEntryId() const; | 96 const std::string& GetEntryId() const; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // Note: This should remain the last member so it'll be destroyed and | 149 // Note: This should remain the last member so it'll be destroyed and |
| 149 // invalidate its weak pointers before any other members are destroyed. | 150 // invalidate its weak pointers before any other members are destroyed. |
| 150 base::WeakPtrFactory<TaskTracker> weak_ptr_factory_; | 151 base::WeakPtrFactory<TaskTracker> weak_ptr_factory_; |
| 151 | 152 |
| 152 DISALLOW_COPY_AND_ASSIGN(TaskTracker); | 153 DISALLOW_COPY_AND_ASSIGN(TaskTracker); |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 } // namespace dom_distiller | 156 } // namespace dom_distiller |
| 156 | 157 |
| 157 #endif // COMPONENTS_DOM_DISTILLER_CORE_TASK_TRACKER_H_ | 158 #endif // COMPONENTS_DOM_DISTILLER_CORE_TASK_TRACKER_H_ |
| OLD | NEW |