| 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 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMediaFileSystems", | 27 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMediaFileSystems", |
| 28 MEDIAGALLERIES_GETMEDIAFILESYSTEMS) | 28 MEDIAGALLERIES_GETMEDIAFILESYSTEMS) |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); | 31 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); |
| 32 virtual bool RunImpl() OVERRIDE; | 32 virtual bool RunImpl() OVERRIDE; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // Bottom half for RunImpl, invoked after the preferences is initialized. | 35 // Bottom half for RunImpl, invoked after the preferences is initialized. |
| 36 void OnPreferencesInit( | 36 void OnPreferencesInit(); |
| 37 MediaGalleries::GetMediaFileSystemsInteractivity interactive); | |
| 38 | 37 |
| 39 // Always show the dialog. | 38 // Always show the dialog. |
| 40 void AlwaysShowDialog(const std::vector<MediaFileSystemInfo>& filesystems); | 39 void AlwaysShowDialog(const std::vector<MediaFileSystemInfo>& filesystems); |
| 41 | 40 |
| 42 // If no galleries are found, show the dialog, otherwise return them. | 41 // If no galleries are found, show the dialog, otherwise return them. |
| 43 void ShowDialogIfNoGalleries( | 42 void ShowDialogIfNoGalleries( |
| 44 const std::vector<MediaFileSystemInfo>& filesystems); | 43 const std::vector<MediaFileSystemInfo>& filesystems); |
| 45 | 44 |
| 46 // Grabs galleries from the media file system registry and passes them to | 45 // Grabs galleries from the media file system registry and passes them to |
| 47 // |ReturnGalleries|. | 46 // |ReturnGalleries|. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 public: | 115 public: |
| 117 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMetadata", | 116 DECLARE_EXTENSION_FUNCTION("mediaGalleries.getMetadata", |
| 118 MEDIAGALLERIES_GETMETADATA) | 117 MEDIAGALLERIES_GETMETADATA) |
| 119 | 118 |
| 120 protected: | 119 protected: |
| 121 virtual ~MediaGalleriesGetMetadataFunction(); | 120 virtual ~MediaGalleriesGetMetadataFunction(); |
| 122 virtual bool RunImpl() OVERRIDE; | 121 virtual bool RunImpl() OVERRIDE; |
| 123 | 122 |
| 124 private: | 123 private: |
| 125 // Bottom half for RunImpl, invoked after the preferences is initialized. | 124 // Bottom half for RunImpl, invoked after the preferences is initialized. |
| 126 void OnPreferencesInit(bool mime_type_only, const std::string& blob_uuid); | 125 void OnPreferencesInit(); |
| 127 | 126 |
| 128 void SniffMimeType(bool mime_type_only, scoped_ptr<std::string> blob_header); | 127 void SniffMimeType(bool mime_type_only, scoped_ptr<std::string> blob_header); |
| 129 }; | 128 }; |
| 130 | 129 |
| 131 } // namespace extensions | 130 } // namespace extensions |
| 132 | 131 |
| 133 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 132 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
| OLD | NEW |