| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 public: | 84 public: |
| 85 DECLARE_EXTENSION_FUNCTION("mediaGalleries.addUserSelectedFolder", | 85 DECLARE_EXTENSION_FUNCTION("mediaGalleries.addUserSelectedFolder", |
| 86 MEDIAGALLERIES_ADDUSERSELECTEDFOLDER) | 86 MEDIAGALLERIES_ADDUSERSELECTEDFOLDER) |
| 87 | 87 |
| 88 protected: | 88 protected: |
| 89 virtual ~MediaGalleriesAddUserSelectedFolderFunction(); | 89 virtual ~MediaGalleriesAddUserSelectedFolderFunction(); |
| 90 virtual bool RunImpl() OVERRIDE; | 90 virtual bool RunImpl() OVERRIDE; |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 // Bottom half for RunImpl, invoked after the preferences is initialized. | 93 // Bottom half for RunImpl, invoked after the preferences is initialized. |
| 94 void OnPreferencesInit(); | 94 void OnPreferencesInit(bool can_access_source_tab); |
| 95 | 95 |
| 96 // Callback for the directory prompt request, with the input from the user. | 96 // Callback for the directory prompt request, with the input from the user. |
| 97 // If |selected_directory| is empty, then the user canceled. | 97 // If |selected_directory| is empty, then the user canceled. |
| 98 // Either handle the user canceled case or add the selected gallery. | 98 // Either handle the user canceled case or add the selected gallery. |
| 99 void OnDirectorySelected(const base::FilePath& selected_directory); | 99 void OnDirectorySelected(const base::FilePath& selected_directory); |
| 100 | 100 |
| 101 // Callback for the directory prompt request. |pref_id| is for the gallery | 101 // Callback for the directory prompt request. |pref_id| is for the gallery |
| 102 // the user just added. |filesystems| is the entire list of file systems. | 102 // the user just added. |filesystems| is the entire list of file systems. |
| 103 // The fsid for the file system that corresponds to |pref_id| will be | 103 // The fsid for the file system that corresponds to |pref_id| will be |
| 104 // appended to the list of file systems returned to the caller. The | 104 // appended to the list of file systems returned to the caller. The |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Bottom half for RunImpl, invoked after the preferences is initialized. | 170 // Bottom half for RunImpl, invoked after the preferences is initialized. |
| 171 void OnPreferencesInit(bool mime_type_only, const std::string& blob_uuid); | 171 void OnPreferencesInit(bool mime_type_only, const std::string& blob_uuid); |
| 172 | 172 |
| 173 void SniffMimeType(bool mime_type_only, scoped_ptr<std::string> blob_header, | 173 void SniffMimeType(bool mime_type_only, scoped_ptr<std::string> blob_header, |
| 174 int64 total_blob_length); | 174 int64 total_blob_length); |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace extensions | 177 } // namespace extensions |
| 178 | 178 |
| 179 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 179 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
| OLD | NEW |