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 "android_webview/lib/main/aw_main_delegate.h" | 5 #include "android_webview/lib/main/aw_main_delegate.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "android_webview/browser/aw_content_browser_client.h" | 9 #include "android_webview/browser/aw_content_browser_client.h" |
10 #include "android_webview/browser/aw_safe_browsing_config_helper.h" | 10 #include "android_webview/browser/aw_safe_browsing_config_helper.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 cl->AppendSwitch(switches::kDisableRendererPriorityManagement); | 154 cl->AppendSwitch(switches::kDisableRendererPriorityManagement); |
155 } | 155 } |
156 | 156 |
157 CommandLineHelper::AddEnabledFeature( | 157 CommandLineHelper::AddEnabledFeature( |
158 *cl, spellcheck::kAndroidSpellCheckerNonLowEnd.name); | 158 *cl, spellcheck::kAndroidSpellCheckerNonLowEnd.name); |
159 | 159 |
160 CommandLineHelper::AddDisabledFeature(*cl, features::kWebPayments.name); | 160 CommandLineHelper::AddDisabledFeature(*cl, features::kWebPayments.name); |
161 | 161 |
162 android_webview::RegisterPathProvider(); | 162 android_webview::RegisterPathProvider(); |
163 | 163 |
164 if (AwSafeBrowsingConfigHelper::GetSafeBrowsingEnabled()) { | 164 safe_browsing_api_handler_.reset( |
165 safe_browsing_api_handler_.reset( | 165 new safe_browsing::SafeBrowsingApiHandlerBridge()); |
166 new safe_browsing::SafeBrowsingApiHandlerBridge()); | 166 safe_browsing::SafeBrowsingApiHandler::SetInstance( |
167 safe_browsing::SafeBrowsingApiHandler::SetInstance( | 167 safe_browsing_api_handler_.get()); |
168 safe_browsing_api_handler_.get()); | |
169 } | |
170 | 168 |
171 return false; | 169 return false; |
172 } | 170 } |
173 | 171 |
174 void AwMainDelegate::PreSandboxStartup() { | 172 void AwMainDelegate::PreSandboxStartup() { |
175 #if defined(ARCH_CPU_ARM_FAMILY) | 173 #if defined(ARCH_CPU_ARM_FAMILY) |
176 // Create an instance of the CPU class to parse /proc/cpuinfo and cache | 174 // Create an instance of the CPU class to parse /proc/cpuinfo and cache |
177 // cpu_brand info. | 175 // cpu_brand info. |
178 base::CPU cpu_info; | 176 base::CPU cpu_info; |
179 #endif | 177 #endif |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 292 |
295 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { | 293 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { |
296 return new AwWebPreferencesPopulaterImpl(); | 294 return new AwWebPreferencesPopulaterImpl(); |
297 } | 295 } |
298 | 296 |
299 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() { | 297 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() { |
300 return new AwLocaleManagerImpl(); | 298 return new AwLocaleManagerImpl(); |
301 } | 299 } |
302 | 300 |
303 } // namespace android_webview | 301 } // namespace android_webview |
OLD | NEW |