Chromium Code Reviews| Index: components/offline_items_collection/core/offline_item.h |
| diff --git a/components/offline_items_collection/core/offline_item.h b/components/offline_items_collection/core/offline_item.h |
| index 5c98e94cd2be1a9a577ad37c98d3ac722eeb0ad6..5a0552eb62baf54dfec056d1b21d2461b65c3fa7 100644 |
| --- a/components/offline_items_collection/core/offline_item.h |
| +++ b/components/offline_items_collection/core/offline_item.h |
| @@ -10,6 +10,7 @@ |
| #include "base/time/time.h" |
| #include "components/offline_items_collection/core/offline_item_filter.h" |
| #include "components/offline_items_collection/core/offline_item_state.h" |
| +#include "ui/gfx/image/image.h" |
| #include "url/gurl.h" |
| namespace offline_items_collection { |
| @@ -133,6 +134,28 @@ struct OfflineItem { |
| int64_t time_remaining_ms; |
| }; |
| +// This struct holds any potentially expensive visuals for an OfflineItem. If |
| +// the front end requires the visuals it will ask for them through the |
| +// OfflineContentProvider interface asynchronously to give the backend time to |
| +// generate them if necessary. |
| +// |
| +// It is not expected that these will change. Currently the UI might cache the |
| +// results of this call. |
| +// TODO(dtrainor): If we run into a scenario where this changes, add a way for |
| +// an OfflineItem update to let us know about an update to the visuals. |
| +struct OfflineItemVisuals { |
| + OfflineItemVisuals(); |
| + OfflineItemVisuals(const OfflineItemVisuals& other); |
| + |
| + ~OfflineItemVisuals(); |
| + |
| + // The icon to use for displaying this item. The icon should be 64dp x 64dp. |
| + // Can be |nullptr| if there is no valid icon for this item. |
|
nyquist
2017/04/13 05:08:25
Is gfx::Image a pointer?
David Trainor- moved to gerrit
2017/04/13 07:20:23
:/ crap yeah I changed it once I realized the inte
|
| + // TODO(dtrainor): Suggest icon size based on the icon size supported by the |
| + // current OS. |
| + gfx::Image icon; |
| +}; |
| + |
| } // namespace offline_items_collection |
| #endif // COMPONENTS_OFFLINE_ITEMS_COLLECTION_OFFLINE_ITEM_H_ |