| 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/shell/browser/cast_content_browser_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "chromecast/shell/browser/cast_browser_context.h" | 9 #include "chromecast/shell/browser/cast_browser_context.h" |
| 10 #include "chromecast/shell/browser/cast_browser_main_parts.h" | 10 #include "chromecast/shell/browser/cast_browser_main_parts.h" |
| 11 #include "chromecast/shell/browser/cast_browser_process.h" | 11 #include "chromecast/shell/browser/cast_browser_process.h" |
| 12 #include "chromecast/shell/browser/geolocation/cast_access_token_store.h" | 12 #include "chromecast/shell/browser/geolocation/cast_access_token_store.h" |
| 13 #include "chromecast/shell/browser/url_request_context_factory.h" | 13 #include "chromecast/shell/browser/url_request_context_factory.h" |
| 14 #include "content/public/browser/browser_thread.h" |
| 14 #include "content/public/browser/certificate_request_result_type.h" | 15 #include "content/public/browser/certificate_request_result_type.h" |
| 15 #include "content/public/browser/render_process_host.h" | 16 #include "content/public/browser/render_process_host.h" |
| 16 #include "content/public/common/content_descriptors.h" | 17 #include "content/public/common/content_descriptors.h" |
| 17 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
| 18 #include "content/public/common/url_constants.h" | 19 #include "content/public/common/url_constants.h" |
| 19 #include "content/public/common/web_preferences.h" | 20 #include "content/public/common/web_preferences.h" |
| 20 | 21 |
| 21 namespace chromecast { | 22 namespace chromecast { |
| 22 namespace shell { | 23 namespace shell { |
| 23 | 24 |
| 24 CastContentBrowserClient::CastContentBrowserClient() | 25 CastContentBrowserClient::CastContentBrowserClient() |
| 25 : url_request_context_factory_(new URLRequestContextFactory()) { | 26 : url_request_context_factory_(new URLRequestContextFactory()) { |
| 26 } | 27 } |
| 27 | 28 |
| 28 CastContentBrowserClient::~CastContentBrowserClient() { | 29 CastContentBrowserClient::~CastContentBrowserClient() { |
| 30 content::BrowserThread::DeleteSoon( |
| 31 content::BrowserThread::IO, |
| 32 FROM_HERE, |
| 33 url_request_context_factory_.release()); |
| 29 } | 34 } |
| 30 | 35 |
| 31 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( | 36 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( |
| 32 const content::MainFunctionParams& parameters) { | 37 const content::MainFunctionParams& parameters) { |
| 33 return new CastBrowserMainParts(parameters, | 38 return new CastBrowserMainParts(parameters, |
| 34 url_request_context_factory_.get()); | 39 url_request_context_factory_.get()); |
| 35 } | 40 } |
| 36 | 41 |
| 37 void CastContentBrowserClient::RenderProcessWillLaunch( | 42 void CastContentBrowserClient::RenderProcessWillLaunch( |
| 38 content::RenderProcessHost* host) { | 43 content::RenderProcessHost* host) { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 146 } |
| 142 | 147 |
| 143 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 148 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 144 const base::CommandLine& command_line, | 149 const base::CommandLine& command_line, |
| 145 int child_process_id, | 150 int child_process_id, |
| 146 std::vector<content::FileDescriptorInfo>* mappings) { | 151 std::vector<content::FileDescriptorInfo>* mappings) { |
| 147 } | 152 } |
| 148 | 153 |
| 149 } // namespace shell | 154 } // namespace shell |
| 150 } // namespace chromecast | 155 } // namespace chromecast |
| OLD | NEW |