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 29 matching lines...) Expand all Loading... |
40 static MediaGalleriesEventRouter* Get(Profile* profile); | 40 static MediaGalleriesEventRouter* Get(Profile* profile); |
41 | 41 |
42 bool ExtensionHasScanProgressListener(const std::string& extension_id) const; | 42 bool ExtensionHasScanProgressListener(const std::string& extension_id) const; |
43 | 43 |
44 // MediaScanManagerObserver implementation. | 44 // MediaScanManagerObserver implementation. |
45 virtual void OnScanStarted(const std::string& extension_id) OVERRIDE; | 45 virtual void OnScanStarted(const std::string& extension_id) OVERRIDE; |
46 virtual void OnScanCancelled(const std::string& extension_id) OVERRIDE; | 46 virtual void OnScanCancelled(const std::string& extension_id) OVERRIDE; |
47 virtual void OnScanFinished( | 47 virtual void OnScanFinished( |
48 const std::string& extension_id, int gallery_count, int image_count, | 48 const std::string& extension_id, int gallery_count, int image_count, |
49 int audio_count, int video_count) OVERRIDE; | 49 int audio_count, int video_count) OVERRIDE; |
| 50 virtual void OnScanError(const std::string& extension_id) OVERRIDE; |
50 | 51 |
51 private: | 52 private: |
52 friend class ProfileKeyedAPIFactory<MediaGalleriesEventRouter>; | 53 friend class ProfileKeyedAPIFactory<MediaGalleriesEventRouter>; |
53 | 54 |
54 void DispatchEventToExtension(const std::string& extension_id, | 55 void DispatchEventToExtension(const std::string& extension_id, |
55 const std::string& event_name, | 56 const std::string& event_name, |
56 scoped_ptr<base::ListValue> event_args); | 57 scoped_ptr<base::ListValue> event_args); |
57 | 58 |
58 explicit MediaGalleriesEventRouter(Profile* profile); | 59 explicit MediaGalleriesEventRouter(Profile* profile); |
59 virtual ~MediaGalleriesEventRouter(); | 60 virtual ~MediaGalleriesEventRouter(); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // Bottom half for RunImpl, invoked after the preferences is initialized. | 229 // Bottom half for RunImpl, invoked after the preferences is initialized. |
229 void OnPreferencesInit(bool mime_type_only, const std::string& blob_uuid); | 230 void OnPreferencesInit(bool mime_type_only, const std::string& blob_uuid); |
230 | 231 |
231 void SniffMimeType(bool mime_type_only, scoped_ptr<std::string> blob_header, | 232 void SniffMimeType(bool mime_type_only, scoped_ptr<std::string> blob_header, |
232 int64 total_blob_length); | 233 int64 total_blob_length); |
233 }; | 234 }; |
234 | 235 |
235 } // namespace extensions | 236 } // namespace extensions |
236 | 237 |
237 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ | 238 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_ |
OLD | NEW |