| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.addGalleryWatch", | 79 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.addGalleryWatch", |
| 80 MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH); | 80 MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH); |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 virtual ~MediaGalleriesPrivateAddGalleryWatchFunction(); | 83 virtual ~MediaGalleriesPrivateAddGalleryWatchFunction(); |
| 84 | 84 |
| 85 // AsyncExtensionFunction overrides. | 85 // AsyncExtensionFunction overrides. |
| 86 virtual bool RunImpl() OVERRIDE; | 86 virtual bool RunImpl() OVERRIDE; |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 void OnStorageMonitorInit(const std::string& pref_id); | 89 void OnPreferencesInit(const std::string& pref_id); |
| 90 | 90 |
| 91 // Gallery watch request handler. | 91 // Gallery watch request handler. |
| 92 void HandleResponse(MediaGalleryPrefId gallery_id, bool success); | 92 void HandleResponse(MediaGalleryPrefId gallery_id, bool success); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // Implements the chrome.mediaGalleriesPrivate.removeGalleryWatch method. | 95 // Implements the chrome.mediaGalleriesPrivate.removeGalleryWatch method. |
| 96 class MediaGalleriesPrivateRemoveGalleryWatchFunction | 96 class MediaGalleriesPrivateRemoveGalleryWatchFunction |
| 97 : public AsyncExtensionFunction { | 97 : public AsyncExtensionFunction { |
| 98 public: | 98 public: |
| 99 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeGalleryWatch", | 99 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeGalleryWatch", |
| 100 MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH); | 100 MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH); |
| 101 | 101 |
| 102 protected: | 102 protected: |
| 103 virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction(); | 103 virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction(); |
| 104 | 104 |
| 105 // SyncExtensionFunction overrides. | 105 // SyncExtensionFunction overrides. |
| 106 virtual bool RunImpl() OVERRIDE; | 106 virtual bool RunImpl() OVERRIDE; |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 void OnStorageMonitorInit(const std::string& pref_id); | 109 void OnPreferencesInit(const std::string& pref_id); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 // Implements the chrome.mediaGalleriesPrivate.getAllGalleryWatch method. | 112 // Implements the chrome.mediaGalleriesPrivate.getAllGalleryWatch method. |
| 113 class MediaGalleriesPrivateGetAllGalleryWatchFunction | 113 class MediaGalleriesPrivateGetAllGalleryWatchFunction |
| 114 : public AsyncExtensionFunction { | 114 : public AsyncExtensionFunction { |
| 115 public: | 115 public: |
| 116 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getAllGalleryWatch", | 116 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getAllGalleryWatch", |
| 117 MEDIAGALLERIESPRIVATE_GETALLGALLERYWATCH); | 117 MEDIAGALLERIESPRIVATE_GETALLGALLERYWATCH); |
| 118 protected: | 118 protected: |
| 119 virtual ~MediaGalleriesPrivateGetAllGalleryWatchFunction(); | 119 virtual ~MediaGalleriesPrivateGetAllGalleryWatchFunction(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 131 public: | 131 public: |
| 132 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeAllGalleryWatch", | 132 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeAllGalleryWatch", |
| 133 MEDIAGALLERIESPRIVATE_REMOVEALLGALLERYWATCH); | 133 MEDIAGALLERIESPRIVATE_REMOVEALLGALLERYWATCH); |
| 134 protected: | 134 protected: |
| 135 virtual ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction(); | 135 virtual ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction(); |
| 136 | 136 |
| 137 // SyncExtensionFunction overrides. | 137 // SyncExtensionFunction overrides. |
| 138 virtual bool RunImpl() OVERRIDE; | 138 virtual bool RunImpl() OVERRIDE; |
| 139 | 139 |
| 140 private: | 140 private: |
| 141 void OnStorageMonitorInit(); | 141 void OnPreferencesInit(); |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 // Implements the chrome.mediaGalleriesPrivate.getHandlers method. | 144 // Implements the chrome.mediaGalleriesPrivate.getHandlers method. |
| 145 class MediaGalleriesPrivateGetHandlersFunction | 145 class MediaGalleriesPrivateGetHandlersFunction |
| 146 : public AsyncExtensionFunction { | 146 : public AsyncExtensionFunction { |
| 147 public: | 147 public: |
| 148 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getHandlers", | 148 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getHandlers", |
| 149 MEDIAGALLERIESPRIVATE_GETHANDLERS); | 149 MEDIAGALLERIESPRIVATE_GETHANDLERS); |
| 150 | 150 |
| 151 protected: | 151 protected: |
| 152 virtual ~MediaGalleriesPrivateGetHandlersFunction(); | 152 virtual ~MediaGalleriesPrivateGetHandlersFunction(); |
| 153 | 153 |
| 154 // AsyncExtensionFunction overrides. | 154 // AsyncExtensionFunction overrides. |
| 155 virtual bool RunImpl() OVERRIDE; | 155 virtual bool RunImpl() OVERRIDE; |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace extensions | 158 } // namespace extensions |
| 159 | 159 |
| 160 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES
_PRIVATE_API_H_ | 160 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES
_PRIVATE_API_H_ |
| OLD | NEW |