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 16 matching lines...) Expand all Loading... |
27 protected: | 27 protected: |
28 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); | 28 virtual ~MediaGalleriesGetMediaFileSystemsFunction(); |
29 virtual bool RunImpl() OVERRIDE; | 29 virtual bool RunImpl() OVERRIDE; |
30 | 30 |
31 private: | 31 private: |
32 // Bottom half for RunImpl, invoked after the storage monitor is initialized. | 32 // Bottom half for RunImpl, invoked after the storage monitor is initialized. |
33 void OnStorageMonitorInit( | 33 void OnStorageMonitorInit( |
34 MediaGalleries::GetMediaFileSystemsInteractivity interactive); | 34 MediaGalleries::GetMediaFileSystemsInteractivity interactive); |
35 | 35 |
36 // Always show the dialog. | 36 // Always show the dialog. |
37 void AlwaysShowDialog( | 37 void AlwaysShowDialog(const std::vector<MediaFileSystemInfo>& filesystems); |
38 const std::vector<chrome::MediaFileSystemInfo>& filesystems); | |
39 | 38 |
40 // If no galleries are found, show the dialog, otherwise return them. | 39 // If no galleries are found, show the dialog, otherwise return them. |
41 void ShowDialogIfNoGalleries( | 40 void ShowDialogIfNoGalleries( |
42 const std::vector<chrome::MediaFileSystemInfo>& filesystems); | 41 const std::vector<MediaFileSystemInfo>& filesystems); |
43 | 42 |
44 // Grabs galleries from the media file system registry and passes them to | 43 // Grabs galleries from the media file system registry and passes them to |
45 // |ReturnGalleries|. | 44 // |ReturnGalleries|. |
46 void GetAndReturnGalleries(); | 45 void GetAndReturnGalleries(); |
47 | 46 |
48 // Returns galleries to the caller. | 47 // Returns galleries to the caller. |
49 void ReturnGalleries( | 48 void ReturnGalleries(const std::vector<MediaFileSystemInfo>& filesystems); |
50 const std::vector<chrome::MediaFileSystemInfo>& filesystems); | |
51 | 49 |
52 // Shows the configuration dialog to edit gallery preferences. | 50 // Shows the configuration dialog to edit gallery preferences. |
53 void ShowDialog(); | 51 void ShowDialog(); |
54 | 52 |
55 // A helper method that calls | 53 // A helper method that calls |
56 // MediaFileSystemRegistry::GetMediaFileSystemsForExtension(). | 54 // MediaFileSystemRegistry::GetMediaFileSystemsForExtension(). |
57 void GetMediaFileSystemsForExtension( | 55 void GetMediaFileSystemsForExtension(const MediaFileSystemsCallback& cb); |
58 const chrome::MediaFileSystemsCallback& cb); | |
59 }; | 56 }; |
60 | 57 |
61 } // namespace extensions | 58 } // namespace extensions |
62 | 59 |
63 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 60 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
OLD | NEW |