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 "android_webview/browser/aw_content_browser_client.h" | 7 #include "android_webview/browser/aw_content_browser_client.h" |
8 #include "android_webview/browser/browser_view_renderer.h" | 8 #include "android_webview/browser/browser_view_renderer.h" |
9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
10 #include "android_webview/common/aw_descriptors.h" | 10 #include "android_webview/common/aw_descriptors.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // TODO(gsennton) we should use | 130 // TODO(gsennton) we should use |
131 // gin::IsolateHolder::kNativesFileName/kSnapshotFileName | 131 // gin::IsolateHolder::kNativesFileName/kSnapshotFileName |
132 // here when those files have arch specific names http://crbug.com/455699 | 132 // here when those files have arch specific names http://crbug.com/455699 |
133 CHECK(base::android::RegisterApkAssetWithGlobalDescriptors( | 133 CHECK(base::android::RegisterApkAssetWithGlobalDescriptors( |
134 kV8NativesDataDescriptor, kNativesFileName)); | 134 kV8NativesDataDescriptor, kNativesFileName)); |
135 CHECK(base::android::RegisterApkAssetWithGlobalDescriptors( | 135 CHECK(base::android::RegisterApkAssetWithGlobalDescriptors( |
136 kV8SnapshotDataDescriptor, kSnapshotFileName)); | 136 kV8SnapshotDataDescriptor, kSnapshotFileName)); |
137 } | 137 } |
138 | 138 |
139 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) { | 139 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) { |
140 cl->AppendSwitch(switches::kUseIpcCommandBuffer); | |
141 cl->AppendSwitch(switches::kInProcessGPU); | 140 cl->AppendSwitch(switches::kInProcessGPU); |
142 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); | 141 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); |
143 } | 142 } |
144 | 143 |
145 return false; | 144 return false; |
146 } | 145 } |
147 | 146 |
148 void AwMainDelegate::PreSandboxStartup() { | 147 void AwMainDelegate::PreSandboxStartup() { |
149 #if defined(ARCH_CPU_ARM_FAMILY) | 148 #if defined(ARCH_CPU_ARM_FAMILY) |
150 // Create an instance of the CPU class to parse /proc/cpuinfo and cache | 149 // Create an instance of the CPU class to parse /proc/cpuinfo and cache |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 #if defined(VIDEO_HOLE) | 246 #if defined(VIDEO_HOLE) |
248 content::ExternalVideoSurfaceContainer* | 247 content::ExternalVideoSurfaceContainer* |
249 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 248 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
250 content::WebContents* web_contents) { | 249 content::WebContents* web_contents) { |
251 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 250 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
252 web_contents); | 251 web_contents); |
253 } | 252 } |
254 #endif | 253 #endif |
255 | 254 |
256 } // namespace android_webview | 255 } // namespace android_webview |
OLD | NEW |