| 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/browser_view_renderer.h" | 10 #include "android_webview/browser/browser_view_renderer.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "base/lazy_instance.h" | 30 #include "base/lazy_instance.h" |
| 31 #include "base/logging.h" | 31 #include "base/logging.h" |
| 32 #include "base/threading/thread_restrictions.h" | 32 #include "base/threading/thread_restrictions.h" |
| 33 #include "cc/base/switches.h" | 33 #include "cc/base/switches.h" |
| 34 #include "components/crash/content/app/breakpad_linux.h" | 34 #include "components/crash/content/app/breakpad_linux.h" |
| 35 #include "components/spellcheck/common/spellcheck_features.h" | 35 #include "components/spellcheck/common/spellcheck_features.h" |
| 36 #include "content/public/browser/android/browser_media_player_manager_register.h
" | 36 #include "content/public/browser/android/browser_media_player_manager_register.h
" |
| 37 #include "content/public/browser/browser_main_runner.h" | 37 #include "content/public/browser/browser_main_runner.h" |
| 38 #include "content/public/browser/browser_thread.h" | 38 #include "content/public/browser/browser_thread.h" |
| 39 #include "content/public/common/content_descriptors.h" | 39 #include "content/public/common/content_descriptors.h" |
| 40 #include "content/public/common/content_features.h" |
| 40 #include "content/public/common/content_switches.h" | 41 #include "content/public/common/content_switches.h" |
| 41 #include "gin/public/isolate_holder.h" | 42 #include "gin/public/isolate_holder.h" |
| 42 #include "gin/v8_initializer.h" | 43 #include "gin/v8_initializer.h" |
| 43 #include "gpu/command_buffer/client/gl_in_process_context.h" | 44 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 44 #include "gpu/command_buffer/service/gpu_switches.h" | 45 #include "gpu/command_buffer/service/gpu_switches.h" |
| 45 #include "media/base/media_switches.h" | 46 #include "media/base/media_switches.h" |
| 46 #include "ui/base/resource/resource_bundle.h" | 47 #include "ui/base/resource/resource_bundle.h" |
| 47 #include "ui/events/gesture_detection/gesture_configuration.h" | 48 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 48 | 49 |
| 49 namespace android_webview { | 50 namespace android_webview { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 136 |
| 136 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) { | 137 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) { |
| 137 cl->AppendSwitch(switches::kInProcessGPU); | 138 cl->AppendSwitch(switches::kInProcessGPU); |
| 138 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); | 139 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); |
| 139 cl->AppendSwitch(switches::kDisableRendererBackgrounding); | 140 cl->AppendSwitch(switches::kDisableRendererBackgrounding); |
| 140 } | 141 } |
| 141 | 142 |
| 142 CommandLineHelper::AddEnabledFeature( | 143 CommandLineHelper::AddEnabledFeature( |
| 143 *cl, spellcheck::kAndroidSpellCheckerNonLowEnd.name); | 144 *cl, spellcheck::kAndroidSpellCheckerNonLowEnd.name); |
| 144 | 145 |
| 146 CommandLineHelper::AddDisabledFeature(*cl, features::kWebPayments.name); |
| 147 |
| 145 return false; | 148 return false; |
| 146 } | 149 } |
| 147 | 150 |
| 148 void AwMainDelegate::PreSandboxStartup() { | 151 void AwMainDelegate::PreSandboxStartup() { |
| 149 #if defined(ARCH_CPU_ARM_FAMILY) | 152 #if defined(ARCH_CPU_ARM_FAMILY) |
| 150 // Create an instance of the CPU class to parse /proc/cpuinfo and cache | 153 // Create an instance of the CPU class to parse /proc/cpuinfo and cache |
| 151 // cpu_brand info. | 154 // cpu_brand info. |
| 152 base::CPU cpu_info; | 155 base::CPU cpu_info; |
| 153 #endif | 156 #endif |
| 154 | 157 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 267 |
| 265 AwMessagePortService* AwMainDelegate::CreateAwMessagePortService() { | 268 AwMessagePortService* AwMainDelegate::CreateAwMessagePortService() { |
| 266 return new AwMessagePortServiceImpl(); | 269 return new AwMessagePortServiceImpl(); |
| 267 } | 270 } |
| 268 | 271 |
| 269 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() { | 272 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() { |
| 270 return new AwLocaleManagerImpl(); | 273 return new AwLocaleManagerImpl(); |
| 271 } | 274 } |
| 272 | 275 |
| 273 } // namespace android_webview | 276 } // namespace android_webview |
| OLD | NEW |