OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // Used for the offline_id for the saved file if non-zero. If it is | 67 // Used for the offline_id for the saved file if non-zero. If it is |
68 // kInvalidOfflineId, a new, random ID will be generated. | 68 // kInvalidOfflineId, a new, random ID will be generated. |
69 int64_t proposed_offline_id; | 69 int64_t proposed_offline_id; |
70 | 70 |
71 // The original URL of the page to save. Empty if no redirect occurs. | 71 // The original URL of the page to save. Empty if no redirect occurs. |
72 GURL original_url; | 72 GURL original_url; |
73 | 73 |
74 // Whether the page is being saved in the background. | 74 // Whether the page is being saved in the background. |
75 bool is_background; | 75 bool is_background; |
| 76 |
| 77 // Run page problem detectors while generating MTHML if true. |
| 78 bool use_page_problem_detectors; |
76 }; | 79 }; |
77 | 80 |
78 // Observer of the OfflinePageModel. | 81 // Observer of the OfflinePageModel. |
79 class Observer { | 82 class Observer { |
80 public: | 83 public: |
81 // Invoked when the model has finished loading. | 84 // Invoked when the model has finished loading. |
82 virtual void OfflinePageModelLoaded(OfflinePageModel* model) = 0; | 85 virtual void OfflinePageModelLoaded(OfflinePageModel* model) = 0; |
83 | 86 |
84 // Invoked when the model is being updated due to adding an offline page. | 87 // Invoked when the model is being updated due to adding an offline page. |
85 virtual void OfflinePageAdded(OfflinePageModel* model, | 88 virtual void OfflinePageAdded(OfflinePageModel* model, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // TODO(dougarnett): Remove this and its uses. | 180 // TODO(dougarnett): Remove this and its uses. |
178 virtual bool is_loaded() const = 0; | 181 virtual bool is_loaded() const = 0; |
179 | 182 |
180 // Returns the logger. Ownership is retained by the model. | 183 // Returns the logger. Ownership is retained by the model. |
181 virtual OfflineEventLogger* GetLogger() = 0; | 184 virtual OfflineEventLogger* GetLogger() = 0; |
182 }; | 185 }; |
183 | 186 |
184 } // namespace offline_pages | 187 } // namespace offline_pages |
185 | 188 |
186 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ | 189 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ |
OLD | NEW |