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 // Defines the Chrome Extensions Media Galleries API functions for accessing | 5 // Defines the Chrome Extensions Media Galleries API functions for accessing |
6 // user's media files, as specified in the extension API IDL. | 6 // user's media files, as specified in the extension API IDL. |
7 | 7 |
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
9 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
10 | 10 |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 bool parse_success, scoped_ptr<base::DictionaryValue> result_dictionary, | 291 bool parse_success, scoped_ptr<base::DictionaryValue> result_dictionary, |
292 scoped_ptr<std::vector<metadata::AttachedImage> > attached_images); | 292 scoped_ptr<std::vector<metadata::AttachedImage> > attached_images); |
293 | 293 |
294 void ConstructNextBlob( | 294 void ConstructNextBlob( |
295 scoped_ptr<base::DictionaryValue> result_dictionary, | 295 scoped_ptr<base::DictionaryValue> result_dictionary, |
296 scoped_ptr<std::vector<metadata::AttachedImage> > attached_images, | 296 scoped_ptr<std::vector<metadata::AttachedImage> > attached_images, |
297 scoped_ptr<std::vector<std::string> > blob_uuids, | 297 scoped_ptr<std::vector<std::string> > blob_uuids, |
298 scoped_ptr<content::BlobHandle> current_blob); | 298 scoped_ptr<content::BlobHandle> current_blob); |
299 }; | 299 }; |
300 | 300 |
301 class MediaGalleriesAddGalleryWatchFunction | |
302 : public ChromeAsyncExtensionFunction { | |
303 public: | |
304 DECLARE_EXTENSION_FUNCTION("mediaGalleries.addGalleryWatch", | |
305 MEDIAGALLERIES_ADDGALLERYWATCH); | |
306 | |
307 protected: | |
308 virtual ~MediaGalleriesAddGalleryWatchFunction(); | |
309 virtual bool RunAsync() OVERRIDE; | |
310 | |
311 private: | |
312 void OnPreferencesInit(const std::string& pref_id); | |
313 | |
314 // Gallery watch request handler. | |
315 void HandleResponse(MediaGalleryPrefId gallery_id, const std::string& error); | |
316 }; | |
Lei Zhang
2014/08/25 22:45:21
We probably should have DISALLOW_COPY_AND_ASSIGN()
Oren Blasberg
2014/08/26 00:40:49
Done.
| |
317 | |
318 class MediaGalleriesRemoveGalleryWatchFunction | |
319 : public ChromeAsyncExtensionFunction { | |
320 public: | |
321 DECLARE_EXTENSION_FUNCTION("mediaGalleries.removeGalleryWatch", | |
322 MEDIAGALLERIES_REMOVEGALLERYWATCH); | |
323 | |
324 protected: | |
325 virtual ~MediaGalleriesRemoveGalleryWatchFunction(); | |
326 virtual bool RunAsync() OVERRIDE; | |
327 | |
328 private: | |
329 void OnPreferencesInit(const std::string& pref_id); | |
330 }; | |
331 | |
332 class MediaGalleriesGetAllGalleryWatchFunction | |
333 : public ChromeAsyncExtensionFunction { | |
334 public: | |
335 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getAllGalleryWatch", | |
336 MEDIAGALLERIES_GETALLGALLERYWATCH); | |
337 | |
338 protected: | |
339 virtual ~MediaGalleriesGetAllGalleryWatchFunction(); | |
340 virtual bool RunAsync() OVERRIDE; | |
341 | |
342 private: | |
343 void OnPreferencesInit(); | |
344 }; | |
345 | |
346 class MediaGalleriesRemoveAllGalleryWatchFunction | |
347 : public ChromeAsyncExtensionFunction { | |
348 public: | |
349 DECLARE_EXTENSION_FUNCTION("mediaGalleries.removeAllGalleryWatch", | |
350 MEDIAGALLERIES_REMOVEALLGALLERYWATCH); | |
351 | |
352 protected: | |
353 virtual ~MediaGalleriesRemoveAllGalleryWatchFunction(); | |
354 virtual bool RunAsync() OVERRIDE; | |
355 | |
356 private: | |
357 void OnPreferencesInit(); | |
358 }; | |
359 | |
301 } // namespace extensions | 360 } // namespace extensions |
302 | 361 |
303 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 362 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
OLD | NEW |