| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // GalleryWatchStateTracker tracks the gallery watchers, updates the | 5 // GalleryWatchStateTracker tracks the gallery watchers, updates the |
| 6 // extension state storage and observes the notification events. | 6 // extension state storage and observes the notification events. |
| 7 // GalleryWatchStateTracker lives on the UI thread. | 7 // GalleryWatchStateTracker lives on the UI thread. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_GALLERY_WATCH_STAT
E_TRACKER_H_ | 9 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_GALLERY_WATCH_STAT
E_TRACKER_H_ |
| 10 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_GALLERY_WATCH_STAT
E_TRACKER_H_ | 10 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_GALLERY_WATCH_STAT
E_TRACKER_H_ |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // extension specified by the |extension_id|. Returns true if the |gallery_id| | 127 // extension specified by the |extension_id|. Returns true if the |gallery_id| |
| 128 // is added into the |watched_extensions_map_| and returns false if the | 128 // is added into the |watched_extensions_map_| and returns false if the |
| 129 // |gallery_id| already exists in the |watched_extensions_map_|. | 129 // |gallery_id| already exists in the |watched_extensions_map_|. |
| 130 bool AddWatchedGalleryIdInfoForExtension(const std::string& extension_id, | 130 bool AddWatchedGalleryIdInfoForExtension(const std::string& extension_id, |
| 131 MediaGalleryPrefId gallery_id); | 131 MediaGalleryPrefId gallery_id); |
| 132 | 132 |
| 133 // Current profile. | 133 // Current profile. |
| 134 Profile* profile_; | 134 Profile* profile_; |
| 135 | 135 |
| 136 // Used to listen for NOTIFICATION_EXTENSION_LOADED and | 136 // Used to listen for NOTIFICATION_EXTENSION_LOADED and |
| 137 // NOTIFICATION_EXTENSION_UNLOADED events. | 137 // NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED events. |
| 138 content::NotificationRegistrar registrar_; | 138 content::NotificationRegistrar registrar_; |
| 139 | 139 |
| 140 // A map of watched gallery details, per extension. | 140 // A map of watched gallery details, per extension. |
| 141 WatchedExtensionsMap watched_extensions_map_; | 141 WatchedExtensionsMap watched_extensions_map_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(GalleryWatchStateTracker); | 143 DISALLOW_COPY_AND_ASSIGN(GalleryWatchStateTracker); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace extensions | 146 } // namespace extensions |
| 147 | 147 |
| 148 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_GALLERY_WATCH_S
TATE_TRACKER_H_ | 148 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_GALLERY_WATCH_S
TATE_TRACKER_H_ |
| OLD | NEW |