| 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 #include "content/browser/media/android/media_resource_getter_impl.h" | 5 #include "content/browser/media/android/media_resource_getter_impl.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/threading/sequenced_worker_pool.h" | 11 #include "base/threading/sequenced_worker_pool.h" |
| 12 #include "content/browser/child_process_security_policy_impl.h" | 12 #include "content/browser/child_process_security_policy_impl.h" |
| 13 #include "content/browser/fileapi/browser_file_system_helper.h" | 13 #include "content/browser/fileapi/browser_file_system_helper.h" |
| 14 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 14 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| 15 #include "content/public/browser/browser_context.h" | 15 #include "content/public/browser/browser_context.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/browser/content_browser_client.h" | 17 #include "content/public/browser/content_browser_client.h" |
| 18 #include "content/public/common/content_client.h" | 18 #include "content/public/common/content_client.h" |
| 19 #include "content/public/common/url_constants.h" | 19 #include "content/public/common/url_constants.h" |
| 20 #include "jni/MediaResourceGetter_jni.h" | 20 #include "jni/MediaResourceGetter_jni.h" |
| 21 #include "media/base/android/media_url_interceptor.h" | 21 #include "media/base/android/media_url_interceptor.h" |
| 22 #include "net/base/auth.h" | 22 #include "net/base/auth.h" |
| 23 #include "net/cookies/cookie_monster.h" | 23 #include "net/cookies/cookie_monster.h" |
| 24 #include "net/cookies/cookie_store.h" | 24 #include "net/cookies/cookie_store.h" |
| 25 #include "net/http/http_auth.h" | 25 #include "net/http/http_auth.h" |
| 26 #include "net/http/http_transaction_factory.h" | 26 #include "net/http/http_transaction_factory.h" |
| 27 #include "net/url_request/url_request_context.h" | 27 #include "net/url_request/url_request_context.h" |
| 28 #include "net/url_request/url_request_context_getter.h" | 28 #include "net/url_request/url_request_context_getter.h" |
| 29 #include "storage/browser/blob/blob_data_handle.h" |
| 30 #include "storage/browser/blob/blob_storage_context.h" |
| 29 #include "url/gurl.h" | 31 #include "url/gurl.h" |
| 30 #include "webkit/browser/blob/blob_data_handle.h" | |
| 31 #include "webkit/browser/blob/blob_storage_context.h" | |
| 32 | 32 |
| 33 using base::android::ConvertUTF8ToJavaString; | 33 using base::android::ConvertUTF8ToJavaString; |
| 34 using base::android::ScopedJavaLocalRef; | 34 using base::android::ScopedJavaLocalRef; |
| 35 | 35 |
| 36 namespace content { | 36 namespace content { |
| 37 | 37 |
| 38 static void ReturnResultOnUIThread( | 38 static void ReturnResultOnUIThread( |
| 39 const base::Callback<void(const std::string&)>& callback, | 39 const base::Callback<void(const std::string&)>& callback, |
| 40 const std::string& result) { | 40 const std::string& result) { |
| 41 BrowserThread::PostTask( | 41 BrowserThread::PostTask( |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 FROM_HERE, | 360 FROM_HERE, |
| 361 base::Bind(&GetMediaMetadataFromFd, fd, offset, size, callback)); | 361 base::Bind(&GetMediaMetadataFromFd, fd, offset, size, callback)); |
| 362 } | 362 } |
| 363 | 363 |
| 364 // static | 364 // static |
| 365 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) { | 365 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) { |
| 366 return RegisterNativesImpl(env); | 366 return RegisterNativesImpl(env); |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace content | 369 } // namespace content |
| OLD | NEW |