aw_media_url_interceptor.h 832 B

12345678910111213141516171819202122232425262728
  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
  3. // found in the LICENSE file.
  4. #ifndef ANDROID_WEBVIEW_BROWSER_AW_MEDIA_URL_INTERCEPTOR_H_
  5. #define ANDROID_WEBVIEW_BROWSER_AW_MEDIA_URL_INTERCEPTOR_H_
  6. #include <stdint.h>
  7. #include <string>
  8. #include "base/android/jni_android.h"
  9. #include "media/base/android/media_url_interceptor.h"
  10. namespace android_webview {
  11. // Interceptor to handle urls for media assets in the apk.
  12. class AwMediaUrlInterceptor : public media::MediaUrlInterceptor {
  13. public:
  14. bool Intercept(const std::string& url,
  15. int* fd,
  16. int64_t* offset,
  17. int64_t* size) const override;
  18. };
  19. } // namespace android_webview
  20. #endif // ANDROID_WEBVIEW_BROWSER_AW_MEDIA_URL_INTERCEPTOR_H_