OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ |
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ | 6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 MediaResourceGetterImpl(BrowserContext* browser_context, | 39 MediaResourceGetterImpl(BrowserContext* browser_context, |
40 storage::FileSystemContext* file_system_context, | 40 storage::FileSystemContext* file_system_context, |
41 int render_process_id, | 41 int render_process_id, |
42 int render_frame_id); | 42 int render_frame_id); |
43 virtual ~MediaResourceGetterImpl(); | 43 virtual ~MediaResourceGetterImpl(); |
44 | 44 |
45 // media::MediaResourceGetter implementation. | 45 // media::MediaResourceGetter implementation. |
46 // Must be called on the UI thread. | 46 // Must be called on the UI thread. |
47 virtual void GetAuthCredentials( | 47 virtual void GetAuthCredentials( |
48 const GURL& url, | 48 const GURL& url, |
49 const GetAuthCredentialsCB& callback) OVERRIDE; | 49 const GetAuthCredentialsCB& callback) override; |
50 virtual void GetCookies( | 50 virtual void GetCookies( |
51 const GURL& url, | 51 const GURL& url, |
52 const GURL& first_party_for_cookies, | 52 const GURL& first_party_for_cookies, |
53 const GetCookieCB& callback) OVERRIDE; | 53 const GetCookieCB& callback) override; |
54 virtual void GetPlatformPathFromURL( | 54 virtual void GetPlatformPathFromURL( |
55 const GURL& url, | 55 const GURL& url, |
56 const GetPlatformPathCB& callback) OVERRIDE; | 56 const GetPlatformPathCB& callback) override; |
57 virtual void ExtractMediaMetadata( | 57 virtual void ExtractMediaMetadata( |
58 const std::string& url, | 58 const std::string& url, |
59 const std::string& cookies, | 59 const std::string& cookies, |
60 const std::string& user_agent, | 60 const std::string& user_agent, |
61 const ExtractMediaMetadataCB& callback) OVERRIDE; | 61 const ExtractMediaMetadataCB& callback) override; |
62 virtual void ExtractMediaMetadata( | 62 virtual void ExtractMediaMetadata( |
63 const int fd, | 63 const int fd, |
64 const int64 offset, | 64 const int64 offset, |
65 const int64 size, | 65 const int64 size, |
66 const ExtractMediaMetadataCB& callback) OVERRIDE; | 66 const ExtractMediaMetadataCB& callback) override; |
67 | 67 |
68 static bool RegisterMediaResourceGetter(JNIEnv* env); | 68 static bool RegisterMediaResourceGetter(JNIEnv* env); |
69 | 69 |
70 private: | 70 private: |
71 // Called when GetAuthCredentials() finishes. | 71 // Called when GetAuthCredentials() finishes. |
72 void GetAuthCredentialsCallback( | 72 void GetAuthCredentialsCallback( |
73 const GetAuthCredentialsCB& callback, | 73 const GetAuthCredentialsCB& callback, |
74 const net::AuthCredentials& credentials); | 74 const net::AuthCredentials& credentials); |
75 | 75 |
76 // Called when GetCookies() finishes. | 76 // Called when GetCookies() finishes. |
(...skipping 18 matching lines...) Expand all Loading... |
95 | 95 |
96 // NOTE: Weak pointers must be invalidated before all other member variables. | 96 // NOTE: Weak pointers must be invalidated before all other member variables. |
97 base::WeakPtrFactory<MediaResourceGetterImpl> weak_factory_; | 97 base::WeakPtrFactory<MediaResourceGetterImpl> weak_factory_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl); | 99 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl); |
100 }; | 100 }; |
101 | 101 |
102 } // namespace content | 102 } // namespace content |
103 | 103 |
104 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ | 104 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ |
OLD | NEW |