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

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: Cleanup the code and prepare for review. Created 6 years, 4 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
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 // Implements the chrome.mediaGalleries.addGalleryWatch method.
tommycli 2014/08/19 16:36:02 Since the other classes don't have this comment in
Oren Blasberg 2014/08/20 22:59:37 Done.
302 class MediaGalleriesAddGalleryWatchFunction
303 : public ChromeAsyncExtensionFunction {
304 public:
305 DECLARE_EXTENSION_FUNCTION("mediaGalleries.addGalleryWatch",
306 MEDIAGALLERIES_ADDGALLERYWATCH);
307
308 protected:
309 virtual ~MediaGalleriesAddGalleryWatchFunction();
310
311 // AsyncExtensionFunction overrides.
tommycli 2014/08/19 16:36:02 Also remove this comment and above newline, make c
Oren Blasberg 2014/08/20 22:59:37 Done.
312 virtual bool RunAsync() OVERRIDE;
313
314 private:
315 void OnPreferencesInit(const std::string& pref_id);
316
317 // Gallery watch request handler.
318 void HandleResponse(MediaGalleryPrefId gallery_id, const std::string& error);
319 };
320
321 // Implements the chrome.mediaGalleries.removeGalleryWatch method.
tommycli 2014/08/19 16:36:02 Ditto on this comment.
Oren Blasberg 2014/08/20 22:59:37 Done.
322 class MediaGalleriesRemoveGalleryWatchFunction
323 : public ChromeAsyncExtensionFunction {
324 public:
325 DECLARE_EXTENSION_FUNCTION("mediaGalleries.removeGalleryWatch",
326 MEDIAGALLERIES_REMOVEGALLERYWATCH);
327
328 protected:
329 virtual ~MediaGalleriesRemoveGalleryWatchFunction();
330
331 // SyncExtensionFunction overrides.
tommycli 2014/08/19 16:36:02 Remove comment and above newline. This comment is
Oren Blasberg 2014/08/20 22:59:37 Done.
332 virtual bool RunAsync() OVERRIDE;
333
334 private:
335 void OnPreferencesInit(const std::string& pref_id);
336 };
337
338 // Implements the chrome.mediaGalleries.getAllGalleryWatch method.
tommycli 2014/08/19 16:36:02 Ditto
Oren Blasberg 2014/08/20 22:59:37 Done.
339 class MediaGalleriesGetAllGalleryWatchFunction
340 : public ChromeAsyncExtensionFunction {
341 public:
342 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getAllGalleryWatch",
343 MEDIAGALLERIES_GETALLGALLERYWATCH);
344 protected:
345 virtual ~MediaGalleriesGetAllGalleryWatchFunction();
346
347 // SyncExtensionFunction overrides.
tommycli 2014/08/19 16:36:02 Ditto
Oren Blasberg 2014/08/20 22:59:37 Done.
348 virtual bool RunAsync() OVERRIDE;
349
350 private:
351 void OnPreferencesInit();
352 };
353
354 // Implements the chrome.mediaGalleries.removeAllGalleryWatch method.
tommycli 2014/08/19 16:36:02 Ditto
Oren Blasberg 2014/08/20 22:59:36 Done.
355 class MediaGalleriesRemoveAllGalleryWatchFunction
356 : public ChromeAsyncExtensionFunction {
357 public:
358 DECLARE_EXTENSION_FUNCTION("mediaGalleries.removeAllGalleryWatch",
359 MEDIAGALLERIES_REMOVEALLGALLERYWATCH);
360 protected:
361 virtual ~MediaGalleriesRemoveAllGalleryWatchFunction();
362
363 // SyncExtensionFunction overrides.
tommycli 2014/08/19 16:36:02 Ditto
Oren Blasberg 2014/08/20 22:59:36 Done.
364 virtual bool RunAsync() OVERRIDE;
365
366 private:
367 void OnPreferencesInit();
368 };
369
301 } // namespace extensions 370 } // namespace extensions
302 371
303 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ 372 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698