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 "ios/chrome/browser/web/chrome_web_client.h" | 5 #include "ios/chrome/browser/web/chrome_web_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/ios/ios_util.h" | 9 #include "base/ios/ios_util.h" |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 << base::SysNSStringToUTF8(error.description); | 52 << base::SysNSStringToUTF8(error.description); |
| 53 DCHECK(content); | 53 DCHECK(content); |
| 54 return content; | 54 return content; |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 | 57 |
| 58 ChromeWebClient::ChromeWebClient() {} | 58 ChromeWebClient::ChromeWebClient() {} |
| 59 | 59 |
| 60 ChromeWebClient::~ChromeWebClient() {} | 60 ChromeWebClient::~ChromeWebClient() {} |
| 61 | 61 |
| 62 web::WebMainParts* ChromeWebClient::CreateWebMainParts() { | 62 std::unique_ptr<web::WebMainParts> ChromeWebClient::CreateWebMainParts() { |
| 63 return new IOSChromeMainParts(*base::CommandLine::ForCurrentProcess()); | 63 return base::MakeUnique<IOSChromeMainParts>( |
|
Eugene But (OOO till 7-30)
2017/01/20 22:11:41
Please add include of ptr_util everywhere where ba
michaeldo
2017/01/23 17:30:54
Done.
| |
| 64 *base::CommandLine::ForCurrentProcess()); | |
| 64 } | 65 } |
| 65 | 66 |
| 66 void ChromeWebClient::PreWebViewCreation() const { | 67 void ChromeWebClient::PreWebViewCreation() const { |
| 67 // Initialize the audio session to allow a web page's audio to continue | 68 // Initialize the audio session to allow a web page's audio to continue |
| 68 // playing after the app is backgrounded. | 69 // playing after the app is backgrounded. |
| 69 VoiceSearchProvider* voice_provider = | 70 VoiceSearchProvider* voice_provider = |
| 70 ios::GetChromeBrowserProvider()->GetVoiceSearchProvider(); | 71 ios::GetChromeBrowserProvider()->GetVoiceSearchProvider(); |
| 71 if (voice_provider) { | 72 if (voice_provider) { |
| 72 AudioSessionController* audio_controller = | 73 AudioSessionController* audio_controller = |
| 73 voice_provider->GetAudioSessionController(); | 74 voice_provider->GetAudioSessionController(); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 // If this call fails, web will fall back to the default params. | 179 // If this call fails, web will fall back to the default params. |
| 179 *params_vector = | 180 *params_vector = |
| 180 task_scheduler_util::GetBrowserWorkerPoolParamsFromVariations(); | 181 task_scheduler_util::GetBrowserWorkerPoolParamsFromVariations(); |
| 181 *index_to_traits_callback = | 182 *index_to_traits_callback = |
| 182 base::Bind(&task_scheduler_util::BrowserWorkerPoolIndexForTraits); | 183 base::Bind(&task_scheduler_util::BrowserWorkerPoolIndexForTraits); |
| 183 } | 184 } |
| 184 | 185 |
| 185 void ChromeWebClient::PerformExperimentalTaskSchedulerRedirections() { | 186 void ChromeWebClient::PerformExperimentalTaskSchedulerRedirections() { |
| 186 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection(); | 187 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection(); |
| 187 } | 188 } |
| OLD | NEW |