Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.h

Issue 440813002: Expose gallery watching functionality to the public mediaGalleries API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix race condition in the apitest. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 };
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698