| 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 #include "chrome/browser/media_gallery/media_galleries_dialog_controller.h" |
| 12 | 13 |
| 13 namespace extensions { | 14 namespace extensions { |
| 14 | 15 |
| 15 class MediaGalleriesGetMediaFileSystemsFunction : public SyncExtensionFunction { | 16 class MediaGalleriesGetMediaFileSystemsFunction : |
| 17 public AsyncExtensionFunction, |
| 18 public chrome::MediaGalleriesDialogDelegate { |
| 16 public: | 19 public: |
| 17 DECLARE_EXTENSION_FUNCTION_NAME("mediaGalleries.getMediaFileSystems") | 20 DECLARE_EXTENSION_FUNCTION_NAME("mediaGalleries.getMediaFileSystems") |
| 18 | 21 |
| 19 protected: | 22 protected: |
| 20 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); | 23 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); |
| 21 virtual bool RunImpl() OVERRIDE; | 24 virtual bool RunImpl() OVERRIDE; |
| 25 |
| 26 private: |
| 27 void ReturnGalleries(); |
| 28 void ShowDialog(); |
| 29 |
| 30 // MediaGalleriesDialogDelegate implementation: |
| 31 virtual void MediaGalleriesDialogFinished() OVERRIDE; |
| 22 }; | 32 }; |
| 23 | 33 |
| 24 class MediaGalleriesAssembleMediaFileFunction : public SyncExtensionFunction { | 34 class MediaGalleriesAssembleMediaFileFunction : public SyncExtensionFunction { |
| 25 public: | 35 public: |
| 26 DECLARE_EXTENSION_FUNCTION_NAME( | 36 DECLARE_EXTENSION_FUNCTION_NAME( |
| 27 "experimental.mediaGalleries.assembleMediaFile") | 37 "experimental.mediaGalleries.assembleMediaFile") |
| 28 | 38 |
| 29 protected: | 39 protected: |
| 30 virtual ~MediaGalleriesAssembleMediaFileFunction(); | 40 virtual ~MediaGalleriesAssembleMediaFileFunction(); |
| 31 virtual bool RunImpl() OVERRIDE; | 41 virtual bool RunImpl() OVERRIDE; |
| 32 }; | 42 }; |
| 33 | 43 |
| 34 } // namespace extensions | 44 } // namespace extensions |
| 35 | 45 |
| 36 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 46 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
| OLD | NEW |