15f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 25f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// found in the LICENSE file. 45f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 55f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#ifndef ANDROID_WEBVIEW_NATIVE_AW_MEDIA_URL_INTERCEPTOR_H_ 65f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#define ANDROID_WEBVIEW_NATIVE_AW_MEDIA_URL_INTERCEPTOR_H_ 75f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 85f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#include <string> 95f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 105f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#include "base/android/jni_android.h" 115f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#include "media/base/android/media_url_interceptor.h" 125f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 135f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)namespace android_webview { 145f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 155f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// Interceptor to handle urls for media assets in the apk. 165f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)class AwMediaUrlInterceptor : public media::MediaUrlInterceptor { 175f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) public: 185f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) virtual bool Intercept(const std::string& url, 195f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) int* fd, 205f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) int64* offset, 215f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) int64* size) const OVERRIDE; 225f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)}; 235f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 245f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)} // namespace android_webview 255f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 265f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)#endif // ANDROID_WEBVIEW_NATIVE_AW_MEDIA_URL_INTERCEPTOR_H_ 27