Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 253593002: Componentize EncryptedMediaMessageFilter and rename it CdmMessageFilter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the empty library problem in macos build. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/renderer/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_browser_main_parts.h" 8 #include "android_webview/browser/aw_browser_main_parts.h"
9 #include "android_webview/browser/aw_contents_client_bridge_base.h" 9 #include "android_webview/browser/aw_contents_client_bridge_base.h"
10 #include "android_webview/browser/aw_contents_io_thread_client.h" 10 #include "android_webview/browser/aw_contents_io_thread_client.h"
11 #include "android_webview/browser/aw_cookie_access_policy.h" 11 #include "android_webview/browser/aw_cookie_access_policy.h"
12 #include "android_webview/browser/aw_quota_permission_context.h" 12 #include "android_webview/browser/aw_quota_permission_context.h"
13 #include "android_webview/browser/aw_web_preferences_populater.h" 13 #include "android_webview/browser/aw_web_preferences_populater.h"
14 #include "android_webview/browser/jni_dependency_factory.h" 14 #include "android_webview/browser/jni_dependency_factory.h"
15 #include "android_webview/browser/net_disk_cache_remover.h" 15 #include "android_webview/browser/net_disk_cache_remover.h"
16 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h" 16 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h"
17 #include "android_webview/common/render_view_messages.h" 17 #include "android_webview/common/render_view_messages.h"
18 #include "android_webview/common/url_constants.h" 18 #include "android_webview/common/url_constants.h"
19 #include "base/base_paths_android.h" 19 #include "base/base_paths_android.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "components/cdm/browser/cdm_message_filter_android.h"
21 #include "content/public/browser/access_token_store.h" 22 #include "content/public/browser/access_token_store.h"
22 #include "content/public/browser/browser_message_filter.h" 23 #include "content/public/browser/browser_message_filter.h"
23 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
24 #include "content/public/browser/child_process_security_policy.h" 25 #include "content/public/browser/child_process_security_policy.h"
25 #include "content/public/browser/render_process_host.h" 26 #include "content/public/browser/render_process_host.h"
26 #include "content/public/browser/render_view_host.h" 27 #include "content/public/browser/render_view_host.h"
27 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
28 #include "content/public/common/url_constants.h" 29 #include "content/public/common/url_constants.h"
29 #include "grit/ui_resources.h" 30 #include "grit/ui_resources.h"
30 #include "net/android/network_library.h" 31 #include "net/android/network_library.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 CHECK(content::RenderProcessHost::run_renderer_in_process()); 201 CHECK(content::RenderProcessHost::run_renderer_in_process());
201 202
202 // Grant content: and file: scheme to the whole process, since we impose 203 // Grant content: and file: scheme to the whole process, since we impose
203 // per-view access checks. 204 // per-view access checks.
204 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( 205 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
205 host->GetID(), android_webview::kContentScheme); 206 host->GetID(), android_webview::kContentScheme);
206 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( 207 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
207 host->GetID(), content::kFileScheme); 208 host->GetID(), content::kFileScheme);
208 209
209 host->AddFilter(new AwContentsMessageFilter(host->GetID())); 210 host->AddFilter(new AwContentsMessageFilter(host->GetID()));
211 host->AddFilter(new cdm::CdmMessageFilterAndroid());
210 } 212 }
211 213
212 net::URLRequestContextGetter* AwContentBrowserClient::CreateRequestContext( 214 net::URLRequestContextGetter* AwContentBrowserClient::CreateRequestContext(
213 content::BrowserContext* browser_context, 215 content::BrowserContext* browser_context,
214 content::ProtocolHandlerMap* protocol_handlers, 216 content::ProtocolHandlerMap* protocol_handlers,
215 content::ProtocolHandlerScopedVector protocol_interceptors) { 217 content::ProtocolHandlerScopedVector protocol_interceptors) {
216 DCHECK(browser_context_.get() == browser_context); 218 DCHECK(browser_context_.get() == browser_context);
217 // TODO(mkosiba,kinuko): protocol_interceptors should be hooked up in the 219 // TODO(mkosiba,kinuko): protocol_interceptors should be hooked up in the
218 // downstream. (crbug.com/350286) 220 // downstream. (crbug.com/350286)
219 return browser_context_->CreateRequestContext(protocol_handlers); 221 return browser_context_->CreateRequestContext(protocol_handlers);
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 501
500 #if defined(VIDEO_HOLE) 502 #if defined(VIDEO_HOLE)
501 content::ExternalVideoSurfaceContainer* 503 content::ExternalVideoSurfaceContainer*
502 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 504 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
503 content::WebContents* web_contents) { 505 content::WebContents* web_contents) {
504 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); 506 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents);
505 } 507 }
506 #endif 508 #endif
507 509
508 } // namespace android_webview 510 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698