Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.h

Issue 224963010: Media Galleries: Add a dropPermissionForMediaFileSystem() API. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase, fix merge conflicts Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Javascript binding for this API will interpret the list appropriately. 172 // Javascript binding for this API will interpret the list appropriately.
173 void ReturnGalleriesAndId( 173 void ReturnGalleriesAndId(
174 MediaGalleryPrefId pref_id, 174 MediaGalleryPrefId pref_id,
175 const std::vector<MediaFileSystemInfo>& filesystems); 175 const std::vector<MediaFileSystemInfo>& filesystems);
176 176
177 // A helper method that calls 177 // A helper method that calls
178 // MediaFileSystemRegistry::GetMediaFileSystemsForExtension(). 178 // MediaFileSystemRegistry::GetMediaFileSystemsForExtension().
179 void GetMediaFileSystemsForExtension(const MediaFileSystemsCallback& cb); 179 void GetMediaFileSystemsForExtension(const MediaFileSystemsCallback& cb);
180 }; 180 };
181 181
182 class MediaGalleriesDropPermissionForMediaFileSystemFunction
183 : public ChromeAsyncExtensionFunction {
184 public:
185 DECLARE_EXTENSION_FUNCTION("mediaGalleries.dropPermissionForMediaFileSystem",
186 MEDIAGALLERIES_DROPPERMISSIONFORMEDIAFILESYSTEM)
187
188 protected:
189 virtual ~MediaGalleriesDropPermissionForMediaFileSystemFunction();
190 virtual bool RunImpl() OVERRIDE;
191
192 private:
193 // Bottom half for RunImpl, invoked after the preferences is initialized.
194 void OnPreferencesInit(MediaGalleryPrefId pref_id);
195 };
196
182 class MediaGalleriesStartMediaScanFunction 197 class MediaGalleriesStartMediaScanFunction
183 : public ChromeAsyncExtensionFunction { 198 : public ChromeAsyncExtensionFunction {
184 public: 199 public:
185 DECLARE_EXTENSION_FUNCTION("mediaGalleries.startMediaScan", 200 DECLARE_EXTENSION_FUNCTION("mediaGalleries.startMediaScan",
186 MEDIAGALLERIES_STARTMEDIASCAN) 201 MEDIAGALLERIES_STARTMEDIASCAN)
187 202
188 protected: 203 protected:
189 virtual ~MediaGalleriesStartMediaScanFunction(); 204 virtual ~MediaGalleriesStartMediaScanFunction();
190 virtual bool RunImpl() OVERRIDE; 205 virtual bool RunImpl() OVERRIDE;
191 206
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 scoped_ptr<std::string> blob_header, 270 scoped_ptr<std::string> blob_header,
256 int64 total_blob_length); 271 int64 total_blob_length);
257 272
258 void OnSafeMediaMetadataParserDone( 273 void OnSafeMediaMetadataParserDone(
259 bool parse_success, base::DictionaryValue* metadata_dictionary); 274 bool parse_success, base::DictionaryValue* metadata_dictionary);
260 }; 275 };
261 276
262 } // namespace extensions 277 } // namespace extensions
263 278
264 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ 279 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698