| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.addGalleryWatch", | 101 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.addGalleryWatch", |
| 102 MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH); | 102 MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH); |
| 103 | 103 |
| 104 protected: | 104 protected: |
| 105 virtual ~MediaGalleriesPrivateAddGalleryWatchFunction(); | 105 virtual ~MediaGalleriesPrivateAddGalleryWatchFunction(); |
| 106 | 106 |
| 107 // AsyncExtensionFunction overrides. | 107 // AsyncExtensionFunction overrides. |
| 108 virtual bool RunImpl() OVERRIDE; | 108 virtual bool RunImpl() OVERRIDE; |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 void OnPreferences(chrome::MediaGalleryPrefId pref_id, |
| 112 chrome::MediaGalleriesPreferences::Vendor* vendor); |
| 113 |
| 111 // Gallery watch request handler. | 114 // Gallery watch request handler. |
| 112 void HandleResponse(chrome::MediaGalleryPrefId gallery_id, | 115 void HandleResponse(chrome::MediaGalleryPrefId gallery_id, |
| 113 bool success); | 116 bool success); |
| 114 }; | 117 }; |
| 115 | 118 |
| 116 // Implements the chrome.mediaGalleriesPrivate.removeGalleryWatch method. | 119 // Implements the chrome.mediaGalleriesPrivate.removeGalleryWatch method. |
| 117 class MediaGalleriesPrivateRemoveGalleryWatchFunction | 120 class MediaGalleriesPrivateRemoveGalleryWatchFunction |
| 118 : public SyncExtensionFunction { | 121 : public AsyncExtensionFunction { |
| 119 public: | 122 public: |
| 120 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeGalleryWatch", | 123 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeGalleryWatch", |
| 121 MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH); | 124 MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH); |
| 122 | 125 |
| 123 protected: | 126 protected: |
| 124 virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction(); | 127 virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction(); |
| 125 | 128 |
| 126 // SyncExtensionFunction overrides. | 129 // SyncExtensionFunction overrides. |
| 127 virtual bool RunImpl() OVERRIDE; | 130 virtual bool RunImpl() OVERRIDE; |
| 131 |
| 132 private: |
| 133 void OnPreferences(chrome::MediaGalleryPrefId pref_id, |
| 134 chrome::MediaGalleriesPreferences::Vendor* vendor); |
| 128 }; | 135 }; |
| 129 | 136 |
| 130 // Implements the chrome.mediaGalleriesPrivate.getAllGalleryWatch method. | 137 // Implements the chrome.mediaGalleriesPrivate.getAllGalleryWatch method. |
| 131 class MediaGalleriesPrivateGetAllGalleryWatchFunction | 138 class MediaGalleriesPrivateGetAllGalleryWatchFunction |
| 132 : public SyncExtensionFunction { | 139 : public SyncExtensionFunction { |
| 133 public: | 140 public: |
| 134 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getAllGalleryWatch", | 141 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getAllGalleryWatch", |
| 135 MEDIAGALLERIESPRIVATE_GETALLGALLERYWATCH); | 142 MEDIAGALLERIESPRIVATE_GETALLGALLERYWATCH); |
| 136 protected: | 143 protected: |
| 137 virtual ~MediaGalleriesPrivateGetAllGalleryWatchFunction(); | 144 virtual ~MediaGalleriesPrivateGetAllGalleryWatchFunction(); |
| 138 | 145 |
| 139 // SyncExtensionFunction overrides. | 146 // SyncExtensionFunction overrides. |
| 140 virtual bool RunImpl() OVERRIDE; | 147 virtual bool RunImpl() OVERRIDE; |
| 141 }; | 148 }; |
| 142 | 149 |
| 143 // Implements the chrome.mediaGalleriesPrivate.removeAllGalleryWatch method. | 150 // Implements the chrome.mediaGalleriesPrivate.removeAllGalleryWatch method. |
| 144 class MediaGalleriesPrivateRemoveAllGalleryWatchFunction | 151 class MediaGalleriesPrivateRemoveAllGalleryWatchFunction |
| 145 : public SyncExtensionFunction { | 152 : public SyncExtensionFunction { |
| 146 public: | 153 public: |
| 147 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeAllGalleryWatch", | 154 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeAllGalleryWatch", |
| 148 MEDIAGALLERIESPRIVATE_REMOVEALLGALLERYWATCH); | 155 MEDIAGALLERIESPRIVATE_REMOVEALLGALLERYWATCH); |
| 149 protected: | 156 protected: |
| 150 virtual ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction(); | 157 virtual ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction(); |
| 151 | 158 |
| 152 // SyncExtensionFunction overrides. | 159 // SyncExtensionFunction overrides. |
| 153 virtual bool RunImpl() OVERRIDE; | 160 virtual bool RunImpl() OVERRIDE; |
| 161 |
| 162 private: |
| 163 void OnPreferences( |
| 164 chrome::MediaGalleriesPreferences::Vendor* vendor, |
| 165 chrome::MediaGalleryPrefId pref_id); |
| 154 }; | 166 }; |
| 155 | 167 |
| 156 // Implements the chrome.mediaGalleriesPrivate.ejectDevice method. | 168 // Implements the chrome.mediaGalleriesPrivate.ejectDevice method. |
| 157 class MediaGalleriesPrivateEjectDeviceFunction | 169 class MediaGalleriesPrivateEjectDeviceFunction |
| 158 : public AsyncExtensionFunction { | 170 : public AsyncExtensionFunction { |
| 159 public: | 171 public: |
| 160 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.ejectDevice", | 172 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.ejectDevice", |
| 161 MEDIAGALLERIESPRIVATE_EJECTDEVICE); | 173 MEDIAGALLERIESPRIVATE_EJECTDEVICE); |
| 162 | 174 |
| 163 protected: | 175 protected: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 181 protected: | 193 protected: |
| 182 virtual ~MediaGalleriesPrivateGetHandlersFunction(); | 194 virtual ~MediaGalleriesPrivateGetHandlersFunction(); |
| 183 | 195 |
| 184 // AsyncExtensionFunction overrides. | 196 // AsyncExtensionFunction overrides. |
| 185 virtual bool RunImpl() OVERRIDE; | 197 virtual bool RunImpl() OVERRIDE; |
| 186 }; | 198 }; |
| 187 | 199 |
| 188 } // namespace extensions | 200 } // namespace extensions |
| 189 | 201 |
| 190 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES
_PRIVATE_API_H_ | 202 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES
_PRIVATE_API_H_ |
| OLD | NEW |