Chromium Code Reviews| 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/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" | 11 #include "chromecast/browser/cast_browser_context.h" |
| 12 #include "chromecast/browser/cast_browser_main_parts.h" | 12 #include "chromecast/browser/cast_browser_main_parts.h" |
| 13 #include "chromecast/browser/cast_browser_process.h" | 13 #include "chromecast/browser/cast_browser_process.h" |
| 14 #include "chromecast/browser/cast_network_delegate.h" | 14 #include "chromecast/browser/cast_network_delegate.h" |
| 15 #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" | 15 #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" |
| 16 #include "chromecast/browser/geolocation/cast_access_token_store.h" | 16 #include "chromecast/browser/geolocation/cast_access_token_store.h" |
| 17 #include "chromecast/browser/url_request_context_factory.h" | 17 #include "chromecast/browser/url_request_context_factory.h" |
| 18 #include "chromecast/common/cast_paths.h" | 18 #include "chromecast/common/cast_paths.h" |
| 19 #include "chromecast/common/global_descriptors.h" | 19 #include "chromecast/common/global_descriptors.h" |
| 20 #include "components/crash/app/breakpad_linux.h" | 20 #include "components/crash/app/breakpad_linux.h" |
| 21 #include "components/dns_prefetch/browser/net_message_filter.h" | |
| 21 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 22 #include "content/public/browser/certificate_request_result_type.h" | 23 #include "content/public/browser/certificate_request_result_type.h" |
| 23 #include "content/public/browser/render_process_host.h" | 24 #include "content/public/browser/render_process_host.h" |
| 24 #include "content/public/common/content_descriptors.h" | 25 #include "content/public/common/content_descriptors.h" |
| 25 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
| 26 #include "content/public/common/url_constants.h" | 27 #include "content/public/common/url_constants.h" |
| 27 #include "content/public/common/web_preferences.h" | 28 #include "content/public/common/web_preferences.h" |
| 28 #include "net/ssl/ssl_cert_request_info.h" | 29 #include "net/ssl/ssl_cert_request_info.h" |
| 29 | 30 |
| 30 #if defined(OS_ANDROID) | 31 #if defined(OS_ANDROID) |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 50 } | 51 } |
| 51 | 52 |
| 52 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( | 53 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( |
| 53 const content::MainFunctionParams& parameters) { | 54 const content::MainFunctionParams& parameters) { |
| 54 return new CastBrowserMainParts(parameters, | 55 return new CastBrowserMainParts(parameters, |
| 55 url_request_context_factory_.get()); | 56 url_request_context_factory_.get()); |
| 56 } | 57 } |
| 57 | 58 |
| 58 void CastContentBrowserClient::RenderProcessWillLaunch( | 59 void CastContentBrowserClient::RenderProcessWillLaunch( |
| 59 content::RenderProcessHost* host) { | 60 content::RenderProcessHost* host) { |
| 61 scoped_refptr<content::BrowserMessageFilter> net_message_filter( | |
| 62 new dns_prefetch::NetMessageFilter( | |
| 63 url_request_context_factory_->host_resolver())); | |
|
lcwu1
2014/12/06 02:01:33
You will need to add net_message_filter to the Ren
gunsch
2014/12/08 17:41:56
Done.
| |
| 60 } | 64 } |
| 61 | 65 |
| 62 net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext( | 66 net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext( |
| 63 content::BrowserContext* browser_context, | 67 content::BrowserContext* browser_context, |
| 64 content::ProtocolHandlerMap* protocol_handlers, | 68 content::ProtocolHandlerMap* protocol_handlers, |
| 65 content::URLRequestInterceptorScopedVector request_interceptors) { | 69 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 66 return url_request_context_factory_->CreateMainGetter( | 70 return url_request_context_factory_->CreateMainGetter( |
| 67 browser_context, | 71 browser_context, |
| 68 protocol_handlers, | 72 protocol_handlers, |
| 69 request_interceptors.Pass()); | 73 request_interceptors.Pass()); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 content::ExternalVideoSurfaceContainer* | 266 content::ExternalVideoSurfaceContainer* |
| 263 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 267 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
| 264 content::WebContents* web_contents) { | 268 content::WebContents* web_contents) { |
| 265 return new ExternalVideoSurfaceContainerImpl(web_contents); | 269 return new ExternalVideoSurfaceContainerImpl(web_contents); |
| 266 } | 270 } |
| 267 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) | 271 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) |
| 268 | 272 |
| 269 | 273 |
| 270 } // namespace shell | 274 } // namespace shell |
| 271 } // namespace chromecast | 275 } // namespace chromecast |
| OLD | NEW |