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

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

Issue 12091054: Media Galleries: Always call MediaFileSystemRegistry::GetMediaFileSystemsForExtension() before show… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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
11 #include <vector> 11 #include <vector>
12 12
13 #include "chrome/browser/extensions/extension_function.h" 13 #include "chrome/browser/extensions/extension_function.h"
14 #include "chrome/browser/media_gallery/media_file_system_registry.h" 14 #include "chrome/browser/media_gallery/media_file_system_registry.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 class MediaGalleriesGetMediaFileSystemsFunction 18 class MediaGalleriesGetMediaFileSystemsFunction
19 : public AsyncExtensionFunction { 19 : public AsyncExtensionFunction {
20 public: 20 public:
21 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMediaFileSystems", 21 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMediaFileSystems",
22 MEDIAGALLERIES_GETMEDIAFILESYSTEMS) 22 MEDIAGALLERIES_GETMEDIAFILESYSTEMS)
23 23
24 protected: 24 protected:
25 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); 25 virtual ~MediaGalleriesGetMediaFileSystemsFunction();
26 virtual bool RunImpl() OVERRIDE; 26 virtual bool RunImpl() OVERRIDE;
27 27
28 private: 28 private:
29 // Always show the dialog.
30 void AlwaysShowDialog(
vandebo (ex-Chrome) 2013/01/30 17:47:30 nit: ShowDialog(
Lei Zhang 2013/01/30 21:00:47 Name's already taken on line 46.
31 const std::vector<chrome::MediaFileSystemInfo>& filesystems);
32
29 // If no galleries are found, show the dialog, otherwise return them. 33 // If no galleries are found, show the dialog, otherwise return them.
30 void ShowDialogIfNoGalleries( 34 void ShowDialogIfNoGalleries(
31 const std::vector<chrome::MediaFileSystemInfo>& filesystems); 35 const std::vector<chrome::MediaFileSystemInfo>& filesystems);
32 36
33 // Grabs galleries from the media file system registry and passes them to 37 // Grabs galleries from the media file system registry and passes them to
34 // |ReturnGalleries|. 38 // |ReturnGalleries|.
35 void GetAndReturnGalleries(); 39 void GetAndReturnGalleries();
36 40
37 // Returns galleries to the caller. 41 // Returns galleries to the caller.
38 void ReturnGalleries( 42 void ReturnGalleries(
(...skipping 10 matching lines...) Expand all
49 EXPERIMENTAL_MEDIAGALLERIES_ASSEMBLEMEDIAFILE) 53 EXPERIMENTAL_MEDIAGALLERIES_ASSEMBLEMEDIAFILE)
50 54
51 protected: 55 protected:
52 virtual ~MediaGalleriesAssembleMediaFileFunction(); 56 virtual ~MediaGalleriesAssembleMediaFileFunction();
53 virtual bool RunImpl() OVERRIDE; 57 virtual bool RunImpl() OVERRIDE;
54 }; 58 };
55 59
56 } // namespace extensions 60 } // namespace extensions
57 61
58 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ 62 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698