OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/android/media_resource_getter_impl.h" | 5 #include "content/browser/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/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/content_browser_client.h" | 16 #include "content/public/browser/content_browser_client.h" |
17 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
18 #include "googleurl/src/gurl.h" | |
19 #include "jni/MediaResourceGetter_jni.h" | 18 #include "jni/MediaResourceGetter_jni.h" |
20 #include "net/cookies/cookie_monster.h" | 19 #include "net/cookies/cookie_monster.h" |
21 #include "net/cookies/cookie_store.h" | 20 #include "net/cookies/cookie_store.h" |
22 #include "net/url_request/url_request_context.h" | 21 #include "net/url_request/url_request_context.h" |
23 #include "net/url_request/url_request_context_getter.h" | 22 #include "net/url_request/url_request_context_getter.h" |
| 23 #include "url/gurl.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 static void ReturnResultOnUIThread( | 27 static void ReturnResultOnUIThread( |
28 const base::Callback<void(const std::string&)>& callback, | 28 const base::Callback<void(const std::string&)>& callback, |
29 const std::string& result) { | 29 const std::string& result) { |
30 BrowserThread::PostTask( | 30 BrowserThread::PostTask( |
31 BrowserThread::UI, FROM_HERE, base::Bind(callback, result)); | 31 BrowserThread::UI, FROM_HERE, base::Bind(callback, result)); |
32 } | 32 } |
33 | 33 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 pool->PostWorkerTask( | 267 pool->PostWorkerTask( |
268 FROM_HERE, base::Bind(&GetMediaMetadata, url, cookies, callback)); | 268 FROM_HERE, base::Bind(&GetMediaMetadata, url, cookies, callback)); |
269 } | 269 } |
270 | 270 |
271 // static | 271 // static |
272 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) { | 272 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) { |
273 return RegisterNativesImpl(env); | 273 return RegisterNativesImpl(env); |
274 } | 274 } |
275 | 275 |
276 } // namespace content | 276 } // namespace content |
OLD | NEW |