| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // The identification used by the client. | 64 // The identification used by the client. |
| 65 ClientId client_id; | 65 ClientId client_id; |
| 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 |
| 74 // Whether to remove the popup overlay that obstructs viewing the normal |
| 75 // content. |
| 76 bool remove_popup_overlay; |
| 73 }; | 77 }; |
| 74 | 78 |
| 75 // Observer of the OfflinePageModel. | 79 // Observer of the OfflinePageModel. |
| 76 class Observer { | 80 class Observer { |
| 77 public: | 81 public: |
| 78 // Invoked when the model has finished loading. | 82 // Invoked when the model has finished loading. |
| 79 virtual void OfflinePageModelLoaded(OfflinePageModel* model) = 0; | 83 virtual void OfflinePageModelLoaded(OfflinePageModel* model) = 0; |
| 80 | 84 |
| 81 // Invoked when the model is being updated due to adding an offline page. | 85 // Invoked when the model is being updated due to adding an offline page. |
| 82 virtual void OfflinePageAdded(OfflinePageModel* model, | 86 virtual void OfflinePageAdded(OfflinePageModel* model, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // TODO(dougarnett): Remove this and its uses. | 178 // TODO(dougarnett): Remove this and its uses. |
| 175 virtual bool is_loaded() const = 0; | 179 virtual bool is_loaded() const = 0; |
| 176 | 180 |
| 177 // Returns the logger. Ownership is retained by the model. | 181 // Returns the logger. Ownership is retained by the model. |
| 178 virtual OfflineEventLogger* GetLogger() = 0; | 182 virtual OfflineEventLogger* GetLogger() = 0; |
| 179 }; | 183 }; |
| 180 | 184 |
| 181 } // namespace offline_pages | 185 } // namespace offline_pages |
| 182 | 186 |
| 183 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ | 187 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_MODEL_H_ |
| OLD | NEW |