OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/shell/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "chromecast/browser/cast_browser_context.h" |
| 12 #include "chromecast/browser/cast_browser_main_parts.h" |
| 13 #include "chromecast/browser/cast_browser_process.h" |
| 14 #include "chromecast/browser/cast_network_delegate.h" |
| 15 #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" |
| 16 #include "chromecast/browser/geolocation/cast_access_token_store.h" |
| 17 #include "chromecast/browser/url_request_context_factory.h" |
11 #include "chromecast/common/cast_paths.h" | 18 #include "chromecast/common/cast_paths.h" |
12 #include "chromecast/common/global_descriptors.h" | 19 #include "chromecast/common/global_descriptors.h" |
13 #include "chromecast/shell/browser/cast_browser_context.h" | |
14 #include "chromecast/shell/browser/cast_browser_main_parts.h" | |
15 #include "chromecast/shell/browser/cast_browser_process.h" | |
16 #include "chromecast/shell/browser/cast_network_delegate.h" | |
17 #include "chromecast/shell/browser/devtools/cast_dev_tools_delegate.h" | |
18 #include "chromecast/shell/browser/geolocation/cast_access_token_store.h" | |
19 #include "chromecast/shell/browser/url_request_context_factory.h" | |
20 #include "components/crash/app/breakpad_linux.h" | 20 #include "components/crash/app/breakpad_linux.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/certificate_request_result_type.h" | 22 #include "content/public/browser/certificate_request_result_type.h" |
23 #include "content/public/browser/render_process_host.h" | 23 #include "content/public/browser/render_process_host.h" |
24 #include "content/public/common/content_descriptors.h" | 24 #include "content/public/common/content_descriptors.h" |
25 #include "content/public/common/content_switches.h" | 25 #include "content/public/common/content_switches.h" |
26 #include "content/public/common/url_constants.h" | 26 #include "content/public/common/url_constants.h" |
27 #include "content/public/common/web_preferences.h" | 27 #include "content/public/common/web_preferences.h" |
28 #include "net/ssl/ssl_cert_request_info.h" | 28 #include "net/ssl/ssl_cert_request_info.h" |
29 | 29 |
30 #if defined(OS_ANDROID) | 30 #if defined(OS_ANDROID) |
31 #include "chromecast/shell/browser/android/external_video_surface_container_impl
.h" | 31 #include "chromecast/browser/android/external_video_surface_container_impl.h" |
32 #endif // defined(OS_ANDROID) | 32 #endif // defined(OS_ANDROID) |
33 | 33 |
34 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
35 #include "components/crash/browser/crash_dump_manager_android.h" | 35 #include "components/crash/browser/crash_dump_manager_android.h" |
36 #endif // defined(OS_ANDROID) | 36 #endif // defined(OS_ANDROID) |
37 | 37 |
38 namespace chromecast { | 38 namespace chromecast { |
39 namespace shell { | 39 namespace shell { |
40 | 40 |
41 CastContentBrowserClient::CastContentBrowserClient() | 41 CastContentBrowserClient::CastContentBrowserClient() |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 content::CertificateRequestResultType* result) { | 141 content::CertificateRequestResultType* result) { |
142 // Allow developers to override certificate errors. | 142 // Allow developers to override certificate errors. |
143 // Otherwise, any fatal certificate errors will cause an abort. | 143 // Otherwise, any fatal certificate errors will cause an abort. |
144 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL; | 144 *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL; |
145 return; | 145 return; |
146 } | 146 } |
147 | 147 |
148 void CastContentBrowserClient::SelectClientCertificate( | 148 void CastContentBrowserClient::SelectClientCertificate( |
149 int render_process_id, | 149 int render_process_id, |
150 int render_view_id, | 150 int render_view_id, |
151 const net::HttpNetworkSession* network_session, | |
152 net::SSLCertRequestInfo* cert_request_info, | 151 net::SSLCertRequestInfo* cert_request_info, |
153 const base::Callback<void(net::X509Certificate*)>& callback) { | 152 const base::Callback<void(net::X509Certificate*)>& callback) { |
154 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString()); | 153 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString()); |
155 | 154 |
156 if (!requesting_url.is_valid()) { | 155 if (!requesting_url.is_valid()) { |
157 LOG(ERROR) << "Invalid URL string: " | 156 LOG(ERROR) << "Invalid URL string: " |
158 << requesting_url.possibly_invalid_spec(); | 157 << requesting_url.possibly_invalid_spec(); |
159 callback.Run(NULL); | 158 callback.Run(NULL); |
160 return; | 159 return; |
161 } | 160 } |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 content::ExternalVideoSurfaceContainer* | 252 content::ExternalVideoSurfaceContainer* |
254 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 253 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
255 content::WebContents* web_contents) { | 254 content::WebContents* web_contents) { |
256 return new ExternalVideoSurfaceContainerImpl(web_contents); | 255 return new ExternalVideoSurfaceContainerImpl(web_contents); |
257 } | 256 } |
258 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) | 257 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) |
259 | 258 |
260 | 259 |
261 } // namespace shell | 260 } // namespace shell |
262 } // namespace chromecast | 261 } // namespace chromecast |
OLD | NEW |