| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "android_webview/native/intercepted_request_data_impl.h" | 5 #include "android_webview/native/intercepted_request_data_impl.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" | 7 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" |
| 8 #include "android_webview/native/input_stream_impl.h" | 8 #include "android_webview/native/input_stream_impl.h" |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 } | 28 } |
| 29 | 29 |
| 30 virtual scoped_ptr<InputStream> OpenInputStream( | 30 virtual scoped_ptr<InputStream> OpenInputStream( |
| 31 JNIEnv* env, | 31 JNIEnv* env, |
| 32 net::URLRequest* request) OVERRIDE { | 32 net::URLRequest* request) OVERRIDE { |
| 33 return intercepted_request_data_impl_->GetInputStream(env).Pass(); | 33 return intercepted_request_data_impl_->GetInputStream(env).Pass(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual bool GetMimeType(JNIEnv* env, | 36 virtual bool GetMimeType(JNIEnv* env, |
| 37 net::URLRequest* request, | 37 net::URLRequest* request, |
| 38 const android_webview::InputStream& stream, | 38 android_webview::InputStream* stream, |
| 39 std::string* mime_type) OVERRIDE { | 39 std::string* mime_type) OVERRIDE { |
| 40 return intercepted_request_data_impl_->GetMimeType(env, mime_type); | 40 return intercepted_request_data_impl_->GetMimeType(env, mime_type); |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual bool GetCharset(JNIEnv* env, | 43 virtual bool GetCharset(JNIEnv* env, |
| 44 net::URLRequest* request, | 44 net::URLRequest* request, |
| 45 const android_webview::InputStream& stream, | 45 android_webview::InputStream* stream, |
| 46 std::string* charset) OVERRIDE { | 46 std::string* charset) OVERRIDE { |
| 47 return intercepted_request_data_impl_->GetCharset(env, charset); | 47 return intercepted_request_data_impl_->GetCharset(env, charset); |
| 48 } | 48 } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 const InterceptedRequestDataImpl* intercepted_request_data_impl_; | 51 const InterceptedRequestDataImpl* intercepted_request_data_impl_; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 net::URLRequestJob* InterceptedRequestDataImpl::CreateJobFor( | 97 net::URLRequestJob* InterceptedRequestDataImpl::CreateJobFor( |
| 98 net::URLRequest* request, | 98 net::URLRequest* request, |
| 99 net::NetworkDelegate* network_delegate) const { | 99 net::NetworkDelegate* network_delegate) const { |
| 100 scoped_ptr<AndroidStreamReaderURLRequestJob::Delegate> | 100 scoped_ptr<AndroidStreamReaderURLRequestJob::Delegate> |
| 101 stream_reader_job_delegate_impl(new StreamReaderJobDelegateImpl(this)); | 101 stream_reader_job_delegate_impl(new StreamReaderJobDelegateImpl(this)); |
| 102 return new AndroidStreamReaderURLRequestJob( | 102 return new AndroidStreamReaderURLRequestJob( |
| 103 request, network_delegate, stream_reader_job_delegate_impl.Pass()); | 103 request, network_delegate, stream_reader_job_delegate_impl.Pass()); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace android_webview | 106 } // namespace android_webview |
| OLD | NEW |