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