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_DISTILLER_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_ |
6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // as page numbers relative to the page number where distillation started. | 84 // as page numbers relative to the page number where distillation started. |
85 // E.g. if distillation starts at page 2 for a 3 page article. The relative | 85 // E.g. if distillation starts at page 2 for a 3 page article. The relative |
86 // page numbers assigned to pages will be [-1,0,1]. | 86 // page numbers assigned to pages will be [-1,0,1]. |
87 | 87 |
88 // Class representing the state of a page under distillation. | 88 // Class representing the state of a page under distillation. |
89 struct DistilledPageData { | 89 struct DistilledPageData { |
90 DistilledPageData(); | 90 DistilledPageData(); |
91 virtual ~DistilledPageData(); | 91 virtual ~DistilledPageData(); |
92 // Relative page number of the page. | 92 // Relative page number of the page. |
93 int page_num; | 93 int page_num; |
94 std::string title; | |
95 ScopedVector<DistillerURLFetcher> image_fetchers_; | 94 ScopedVector<DistillerURLFetcher> image_fetchers_; |
96 scoped_refptr<base::RefCountedData<DistilledPageProto> > | 95 scoped_refptr<base::RefCountedData<DistilledPageProto> > |
97 distilled_page_proto; | 96 distilled_page_proto; |
98 | 97 |
99 private: | 98 private: |
100 DISALLOW_COPY_AND_ASSIGN(DistilledPageData); | 99 DISALLOW_COPY_AND_ASSIGN(DistilledPageData); |
101 }; | 100 }; |
102 | 101 |
103 void OnFetchImageDone(int page_num, | 102 void OnFetchImageDone(int page_num, |
104 DistillerURLFetcher* url_fetcher, | 103 DistillerURLFetcher* url_fetcher, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 bool destruction_allowed_; | 177 bool destruction_allowed_; |
179 | 178 |
180 base::WeakPtrFactory<DistillerImpl> weak_factory_; | 179 base::WeakPtrFactory<DistillerImpl> weak_factory_; |
181 | 180 |
182 DISALLOW_COPY_AND_ASSIGN(DistillerImpl); | 181 DISALLOW_COPY_AND_ASSIGN(DistillerImpl); |
183 }; | 182 }; |
184 | 183 |
185 } // namespace dom_distiller | 184 } // namespace dom_distiller |
186 | 185 |
187 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_ | 186 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_ |
OLD | NEW |