| 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 JSON. | 6 // user's media files, as specified in the extension API JSON. |
| 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 "chrome/browser/extensions/extension_function.h" | 11 #include "chrome/browser/extensions/extension_function.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 class MediaGalleriesGetMediaFileSystemsFunction : public SyncExtensionFunction { | 15 class MediaGalleriesGetMediaFileSystemsFunction |
| 16 : public AsyncExtensionFunction { |
| 16 public: | 17 public: |
| 17 DECLARE_EXTENSION_FUNCTION_NAME( | 18 DECLARE_EXTENSION_FUNCTION_NAME( |
| 18 "experimental.mediaGalleries.getMediaFileSystems") | 19 "experimental.mediaGalleries.getMediaFileSystems") |
| 19 | 20 |
| 20 protected: | 21 protected: |
| 21 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); | 22 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); |
| 22 virtual bool RunImpl() OVERRIDE; | 23 virtual bool RunImpl() OVERRIDE; |
| 24 |
| 25 private: |
| 26 // Grabs the galleries from the preferences system and returns them. |
| 27 void ReturnGalleries(); |
| 28 |
| 29 // Shows the configuration dialog to edit gallery preferences. |
| 30 void ShowDialog(); |
| 23 }; | 31 }; |
| 24 | 32 |
| 25 class MediaGalleriesAssembleMediaFileFunction : public SyncExtensionFunction { | 33 class MediaGalleriesAssembleMediaFileFunction : public SyncExtensionFunction { |
| 26 public: | 34 public: |
| 27 DECLARE_EXTENSION_FUNCTION_NAME( | 35 DECLARE_EXTENSION_FUNCTION_NAME( |
| 28 "experimental.mediaGalleries.assembleMediaFile") | 36 "experimental.mediaGalleries.assembleMediaFile") |
| 29 | 37 |
| 30 protected: | 38 protected: |
| 31 virtual ~MediaGalleriesAssembleMediaFileFunction(); | 39 virtual ~MediaGalleriesAssembleMediaFileFunction(); |
| 32 virtual bool RunImpl() OVERRIDE; | 40 virtual bool RunImpl() OVERRIDE; |
| 33 }; | 41 }; |
| 34 | 42 |
| 35 } // namespace extensions | 43 } // namespace extensions |
| 36 | 44 |
| 37 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 45 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
| OLD | NEW |