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 <stdint.h> | 9 #include <stdint.h> |
10 #include <string> | 10 #include <string> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 const GetPlatformPathCB& callback) override; | 55 const GetPlatformPathCB& callback) override; |
56 void ExtractMediaMetadata(const std::string& url, | 56 void ExtractMediaMetadata(const std::string& url, |
57 const std::string& cookies, | 57 const std::string& cookies, |
58 const std::string& user_agent, | 58 const std::string& user_agent, |
59 const ExtractMediaMetadataCB& callback) override; | 59 const ExtractMediaMetadataCB& callback) override; |
60 void ExtractMediaMetadata(const int fd, | 60 void ExtractMediaMetadata(const int fd, |
61 const int64_t offset, | 61 const int64_t offset, |
62 const int64_t size, | 62 const int64_t size, |
63 const ExtractMediaMetadataCB& callback) override; | 63 const ExtractMediaMetadataCB& callback) override; |
64 | 64 |
65 static bool RegisterMediaResourceGetter(JNIEnv* env); | |
66 | |
67 private: | 65 private: |
68 // Called when GetAuthCredentials() finishes. | 66 // Called when GetAuthCredentials() finishes. |
69 void GetAuthCredentialsCallback( | 67 void GetAuthCredentialsCallback( |
70 const GetAuthCredentialsCB& callback, | 68 const GetAuthCredentialsCB& callback, |
71 const net::AuthCredentials& credentials); | 69 const net::AuthCredentials& credentials); |
72 | 70 |
73 // Called when GetCookies() finishes. | 71 // Called when GetCookies() finishes. |
74 void GetCookiesCallback( | 72 void GetCookiesCallback( |
75 const GetCookieCB& callback, const std::string& cookies); | 73 const GetCookieCB& callback, const std::string& cookies); |
76 | 74 |
(...skipping 15 matching lines...) Expand all Loading... |
92 | 90 |
93 // NOTE: Weak pointers must be invalidated before all other member variables. | 91 // NOTE: Weak pointers must be invalidated before all other member variables. |
94 base::WeakPtrFactory<MediaResourceGetterImpl> weak_factory_; | 92 base::WeakPtrFactory<MediaResourceGetterImpl> weak_factory_; |
95 | 93 |
96 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl); | 94 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl); |
97 }; | 95 }; |
98 | 96 |
99 } // namespace content | 97 } // namespace content |
100 | 98 |
101 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ | 99 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ |
OLD | NEW |