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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 namespace extensions { | 36 namespace extensions { |
37 | 37 |
38 class Extension; | 38 class Extension; |
39 | 39 |
40 // The profile-keyed service that manages the media galleries extension API. | 40 // The profile-keyed service that manages the media galleries extension API. |
41 // Created at the same time as the Profile. This is also the event router. | 41 // Created at the same time as the Profile. This is also the event router. |
42 class MediaGalleriesEventRouter : public BrowserContextKeyedAPI, | 42 class MediaGalleriesEventRouter : public BrowserContextKeyedAPI, |
43 public MediaScanManagerObserver { | 43 public MediaScanManagerObserver { |
44 public: | 44 public: |
45 // BrowserContextKeyedService implementation. | 45 // KeyedService implementation. |
46 virtual void Shutdown() OVERRIDE; | 46 virtual void Shutdown() OVERRIDE; |
47 | 47 |
48 // BrowserContextKeyedAPI implementation. | 48 // BrowserContextKeyedAPI implementation. |
49 static BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>* | 49 static BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>* |
50 GetFactoryInstance(); | 50 GetFactoryInstance(); |
51 | 51 |
52 // Convenience method to get the MediaGalleriesAPI for a profile. | 52 // Convenience method to get the MediaGalleriesAPI for a profile. |
53 static MediaGalleriesEventRouter* Get(content::BrowserContext* context); | 53 static MediaGalleriesEventRouter* Get(content::BrowserContext* context); |
54 | 54 |
55 bool ExtensionHasScanProgressListener(const std::string& extension_id) const; | 55 bool ExtensionHasScanProgressListener(const std::string& extension_id) const; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 scoped_ptr<std::string> blob_header, | 255 scoped_ptr<std::string> blob_header, |
256 int64 total_blob_length); | 256 int64 total_blob_length); |
257 | 257 |
258 void OnSafeMediaMetadataParserDone( | 258 void OnSafeMediaMetadataParserDone( |
259 bool parse_success, base::DictionaryValue* metadata_dictionary); | 259 bool parse_success, base::DictionaryValue* metadata_dictionary); |
260 }; | 260 }; |
261 | 261 |
262 } // namespace extensions | 262 } // namespace extensions |
263 | 263 |
264 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 264 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
OLD | NEW |