OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ANDROID_WEBVIEW_NATIVE_AW_MEDIA_URL_INTERCEPTOR_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_MEDIA_URL_INTERCEPTOR_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_MEDIA_URL_INTERCEPTOR_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_MEDIA_URL_INTERCEPTOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/android/jni_android.h" | 12 #include "base/android/jni_android.h" |
13 #include "media/base/android/media_url_interceptor.h" | 13 #include "media/base/android/media_url_interceptor.h" |
14 | 14 |
15 namespace android_webview { | 15 namespace android_webview { |
16 | 16 |
17 // Interceptor to handle urls for media assets in the apk. | 17 // Interceptor to handle urls for media assets in the apk. |
18 class AwMediaUrlInterceptor : public media::MediaUrlInterceptor { | 18 class AwMediaUrlInterceptor : public media::MediaUrlInterceptor { |
19 public: | 19 public: |
20 bool Intercept(const std::string& url, | 20 bool Intercept(const std::string& url, |
21 int* fd, | 21 int* fd, |
22 int64_t* offset, | 22 int64_t* offset, |
23 int64_t* size) const override; | 23 int64_t* size) const override; |
24 }; | 24 }; |
25 | 25 |
26 } // namespace android_webview | 26 } // namespace android_webview |
27 | 27 |
28 #endif // ANDROID_WEBVIEW_NATIVE_AW_MEDIA_URL_INTERCEPTOR_H_ | 28 #endif // ANDROID_WEBVIEW_BROWSER_AW_MEDIA_URL_INTERCEPTOR_H_ |
OLD | NEW |