Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 #include "base/android/apk_assets.h" | 25 #include "base/android/apk_assets.h" |
| 26 #include "base/command_line.h" | 26 #include "base/command_line.h" |
| 27 #include "base/cpu.h" | 27 #include "base/cpu.h" |
| 28 #include "base/i18n/icu_util.h" | 28 #include "base/i18n/icu_util.h" |
| 29 #include "base/lazy_instance.h" | 29 #include "base/lazy_instance.h" |
| 30 #include "base/logging.h" | 30 #include "base/logging.h" |
| 31 #include "base/threading/thread_restrictions.h" | 31 #include "base/threading/thread_restrictions.h" |
| 32 #include "cc/base/switches.h" | 32 #include "cc/base/switches.h" |
| 33 #include "components/crash/content/app/breakpad_linux.h" | 33 #include "components/crash/content/app/breakpad_linux.h" |
| 34 #include "components/external_video_surface/browser/android/external_video_surfa ce_container_impl.h" | 34 #include "components/external_video_surface/browser/android/external_video_surfa ce_container_impl.h" |
| 35 #include "components/spellcheck/common/spellcheck_switches.h" | |
| 35 #include "content/public/browser/android/browser_media_player_manager_register.h " | 36 #include "content/public/browser/android/browser_media_player_manager_register.h " |
| 36 #include "content/public/browser/browser_main_runner.h" | 37 #include "content/public/browser/browser_main_runner.h" |
| 37 #include "content/public/browser/browser_thread.h" | 38 #include "content/public/browser/browser_thread.h" |
| 38 #include "content/public/common/content_descriptors.h" | 39 #include "content/public/common/content_descriptors.h" |
| 39 #include "content/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
| 40 #include "gin/public/isolate_holder.h" | 41 #include "gin/public/isolate_holder.h" |
| 41 #include "gin/v8_initializer.h" | 42 #include "gin/v8_initializer.h" |
| 42 #include "gpu/command_buffer/client/gl_in_process_context.h" | 43 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 43 #include "gpu/command_buffer/service/gpu_switches.h" | 44 #include "gpu/command_buffer/service/gpu_switches.h" |
| 44 #include "media/base/media_switches.h" | 45 #include "media/base/media_switches.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 gin::V8Initializer::GetSnapshotFilePath(false).AsUTF8Unsafe()); | 133 gin::V8Initializer::GetSnapshotFilePath(false).AsUTF8Unsafe()); |
| 133 } | 134 } |
| 134 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 135 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 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 |
| 143 #if defined(ENABLE_SPELLCHECK) | |
| 144 cl->AppendSwitch(spellcheck::switches::kEnableAndroidSpellChecker); | |
|
Tobias Sargeant
2016/08/23 14:17:58
I don't think we want to unilaterally enable this
timvolodine
2016/08/23 15:29:18
right sorry forgot to remove this after testing lo
| |
| 145 #endif | |
| 146 | |
| 142 return false; | 147 return false; |
| 143 } | 148 } |
| 144 | 149 |
| 145 void AwMainDelegate::PreSandboxStartup() { | 150 void AwMainDelegate::PreSandboxStartup() { |
| 146 #if defined(ARCH_CPU_ARM_FAMILY) | 151 #if defined(ARCH_CPU_ARM_FAMILY) |
| 147 // Create an instance of the CPU class to parse /proc/cpuinfo and cache | 152 // Create an instance of the CPU class to parse /proc/cpuinfo and cache |
| 148 // cpu_brand info. | 153 // cpu_brand info. |
| 149 base::CPU cpu_info; | 154 base::CPU cpu_info; |
| 150 #endif | 155 #endif |
| 151 | 156 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 #if defined(VIDEO_HOLE) | 268 #if defined(VIDEO_HOLE) |
| 264 content::ExternalVideoSurfaceContainer* | 269 content::ExternalVideoSurfaceContainer* |
| 265 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 270 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
| 266 content::WebContents* web_contents) { | 271 content::WebContents* web_contents) { |
| 267 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 272 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
| 268 web_contents); | 273 web_contents); |
| 269 } | 274 } |
| 270 #endif | 275 #endif |
| 271 | 276 |
| 272 } // namespace android_webview | 277 } // namespace android_webview |
| OLD | NEW |