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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 #include "content/public/browser/child_process_data.h" | 146 #include "content/public/browser/child_process_data.h" |
147 #include "content/public/browser/child_process_security_policy.h" | 147 #include "content/public/browser/child_process_security_policy.h" |
148 #include "content/public/browser/client_certificate_delegate.h" | 148 #include "content/public/browser/client_certificate_delegate.h" |
149 #include "content/public/browser/geolocation_delegate.h" | 149 #include "content/public/browser/geolocation_delegate.h" |
150 #include "content/public/browser/navigation_handle.h" | 150 #include "content/public/browser/navigation_handle.h" |
151 #include "content/public/browser/navigation_throttle.h" | 151 #include "content/public/browser/navigation_throttle.h" |
152 #include "content/public/browser/render_frame_host.h" | 152 #include "content/public/browser/render_frame_host.h" |
153 #include "content/public/browser/render_process_host.h" | 153 #include "content/public/browser/render_process_host.h" |
154 #include "content/public/browser/render_view_host.h" | 154 #include "content/public/browser/render_view_host.h" |
155 #include "content/public/browser/resource_context.h" | 155 #include "content/public/browser/resource_context.h" |
156 #include "content/public/browser/resource_dispatcher_host.h" | |
156 #include "content/public/browser/site_instance.h" | 157 #include "content/public/browser/site_instance.h" |
157 #include "content/public/browser/storage_partition.h" | 158 #include "content/public/browser/storage_partition.h" |
158 #include "content/public/browser/vpn_service_proxy.h" | 159 #include "content/public/browser/vpn_service_proxy.h" |
159 #include "content/public/browser/web_contents.h" | 160 #include "content/public/browser/web_contents.h" |
160 #include "content/public/common/child_process_host.h" | 161 #include "content/public/common/child_process_host.h" |
161 #include "content/public/common/content_descriptors.h" | 162 #include "content/public/common/content_descriptors.h" |
162 #include "content/public/common/content_features.h" | 163 #include "content/public/common/content_features.h" |
163 #include "content/public/common/content_switches.h" | 164 #include "content/public/common/content_switches.h" |
164 #include "content/public/common/mojo_shell_connection.h" | 165 #include "content/public/common/mojo_shell_connection.h" |
165 #include "content/public/common/sandbox_type.h" | 166 #include "content/public/common/sandbox_type.h" |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1147 content::RenderProcessHost* process_host, | 1148 content::RenderProcessHost* process_host, |
1148 const GURL& url) { | 1149 const GURL& url) { |
1149 #if defined(ENABLE_EXTENSIONS) | 1150 #if defined(ENABLE_EXTENSIONS) |
1150 return ChromeContentBrowserClientExtensionsPart::CanCommitURL( | 1151 return ChromeContentBrowserClientExtensionsPart::CanCommitURL( |
1151 process_host, url); | 1152 process_host, url); |
1152 #else | 1153 #else |
1153 return true; | 1154 return true; |
1154 #endif | 1155 #endif |
1155 } | 1156 } |
1156 | 1157 |
1157 bool ChromeContentBrowserClient::IsIllegalOrigin( | 1158 bool ChromeContentBrowserClient::IsIllegalOrigin( |
jam
2016/08/01 20:06:01
remove this method here and in the public interfac
ananta
2016/08/02 00:40:49
Done.
jam
2016/08/02 17:01:46
please also remove from ContentBrowserClient
| |
1158 content::ResourceContext* resource_context, | 1159 content::ResourceContext* resource_context, |
1159 int child_process_id, | 1160 int child_process_id, |
1160 const GURL& origin) { | 1161 const GURL& origin) { |
1161 #if defined(ENABLE_EXTENSIONS) | 1162 #if defined(ENABLE_EXTENSIONS) |
1162 return ChromeContentBrowserClientExtensionsPart::IsIllegalOrigin( | 1163 return ChromeContentBrowserClientExtensionsPart::IsIllegalOrigin( |
1163 resource_context, child_process_id, origin); | 1164 resource_context, child_process_id, origin); |
1164 #else | 1165 #else |
1165 return false; | 1166 return false; |
1166 #endif | 1167 #endif |
1167 } | 1168 } |
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2287 blocked_params)); | 2288 blocked_params)); |
2288 return false; | 2289 return false; |
2289 } | 2290 } |
2290 #endif | 2291 #endif |
2291 | 2292 |
2292 return true; | 2293 return true; |
2293 } | 2294 } |
2294 | 2295 |
2295 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { | 2296 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { |
2296 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2297 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2298 #if defined(ENABLE_EXTENSIONS) | |
2299 DCHECK(content::ResourceDispatcherHost::Get()); | |
jam
2016/08/01 20:06:01
nit: not needed by definition. if somehow someone
ananta
2016/08/02 00:40:49
Done.
| |
2300 content::ResourceDispatcherHost::Get()->AddSchemeForAccessCheck( | |
2301 extensions::kExtensionScheme); | |
jam
2016/08/01 20:06:01
The rest of the RDH initialization on the chrome s
ananta
2016/08/02 00:40:49
Done.
| |
2302 #endif | |
2297 return g_browser_process->ResourceDispatcherHostCreated(); | 2303 return g_browser_process->ResourceDispatcherHostCreated(); |
2298 } | 2304 } |
2299 | 2305 |
2300 content::SpeechRecognitionManagerDelegate* | 2306 content::SpeechRecognitionManagerDelegate* |
2301 ChromeContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { | 2307 ChromeContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { |
2302 return new speech::ChromeSpeechRecognitionManagerDelegate(); | 2308 return new speech::ChromeSpeechRecognitionManagerDelegate(); |
2303 } | 2309 } |
2304 | 2310 |
2305 net::NetLog* ChromeContentBrowserClient::GetNetLog() { | 2311 net::NetLog* ChromeContentBrowserClient::GetNetLog() { |
2306 return g_browser_process->net_log(); | 2312 return g_browser_process->net_log(); |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3076 if (channel <= kMaxDisableEncryptionChannel) { | 3082 if (channel <= kMaxDisableEncryptionChannel) { |
3077 static const char* const kWebRtcDevSwitchNames[] = { | 3083 static const char* const kWebRtcDevSwitchNames[] = { |
3078 switches::kDisableWebRtcEncryption, | 3084 switches::kDisableWebRtcEncryption, |
3079 }; | 3085 }; |
3080 to_command_line->CopySwitchesFrom(from_command_line, | 3086 to_command_line->CopySwitchesFrom(from_command_line, |
3081 kWebRtcDevSwitchNames, | 3087 kWebRtcDevSwitchNames, |
3082 arraysize(kWebRtcDevSwitchNames)); | 3088 arraysize(kWebRtcDevSwitchNames)); |
3083 } | 3089 } |
3084 } | 3090 } |
3085 #endif // defined(ENABLE_WEBRTC) | 3091 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |