| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 DISALLOW_COPY_AND_ASSIGN(DistilledPageData); | 102 DISALLOW_COPY_AND_ASSIGN(DistilledPageData); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 void OnFetchImageDone(int page_num, | 105 void OnFetchImageDone(int page_num, |
| 106 DistillerURLFetcher* url_fetcher, | 106 DistillerURLFetcher* url_fetcher, |
| 107 const std::string& id, | 107 const std::string& id, |
| 108 const std::string& response); | 108 const std::string& response); |
| 109 | 109 |
| 110 void OnPageDistillationFinished(int page_num, | 110 void OnPageDistillationFinished( |
| 111 const GURL& page_url, | 111 int page_num, |
| 112 scoped_ptr<DistilledPageInfo> distilled_page, | 112 const GURL& page_url, |
| 113 bool distillation_successful); | 113 scoped_ptr<proto::DomDistillerResult> distilled_page, |
| 114 bool distillation_successful); |
| 114 | 115 |
| 115 virtual void FetchImage(int page_num, | 116 virtual void FetchImage(int page_num, |
| 116 const std::string& image_id, | 117 const std::string& image_id, |
| 117 const std::string& item); | 118 const std::string& item); |
| 118 | 119 |
| 119 // Distills the next page. | 120 // Distills the next page. |
| 120 void DistillNextPage(); | 121 void DistillNextPage(); |
| 121 | 122 |
| 122 // Adds the |url| to |pages_to_be_distilled| if |page_num| is a valid relative | 123 // Adds the |url| to |pages_to_be_distilled| if |page_num| is a valid relative |
| 123 // page number and |url| is valid. Ignores duplicate pages and urls. | 124 // page number and |url| is valid. Ignores duplicate pages and urls. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 bool destruction_allowed_; | 183 bool destruction_allowed_; |
| 183 | 184 |
| 184 base::WeakPtrFactory<DistillerImpl> weak_factory_; | 185 base::WeakPtrFactory<DistillerImpl> weak_factory_; |
| 185 | 186 |
| 186 DISALLOW_COPY_AND_ASSIGN(DistillerImpl); | 187 DISALLOW_COPY_AND_ASSIGN(DistillerImpl); |
| 187 }; | 188 }; |
| 188 | 189 |
| 189 } // namespace dom_distiller | 190 } // namespace dom_distiller |
| 190 | 191 |
| 191 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_ | 192 #endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_ |
| OLD | NEW |