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