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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 cl->AppendSwitch(switches::kEnableAggressiveDOMStorageFlushing); | 114 cl->AppendSwitch(switches::kEnableAggressiveDOMStorageFlushing); |
115 | 115 |
116 // Webview does not currently support the Presentation API, see | 116 // Webview does not currently support the Presentation API, see |
117 // https://crbug.com/521319 | 117 // https://crbug.com/521319 |
118 cl->AppendSwitch(switches::kDisablePresentationAPI); | 118 cl->AppendSwitch(switches::kDisablePresentationAPI); |
119 | 119 |
120 if (cl->GetSwitchValueASCII(switches::kProcessType).empty()) { | 120 if (cl->GetSwitchValueASCII(switches::kProcessType).empty()) { |
121 // Browser process (no type specified). | 121 // Browser process (no type specified). |
122 | 122 |
123 base::android::RegisterApkAssetWithGlobalDescriptors( | 123 base::android::RegisterApkAssetWithGlobalDescriptors( |
124 kV8NativesDataDescriptor32, | 124 kV8NativesDataDescriptor, |
125 gin::V8Initializer::GetNativesFilePath(true).AsUTF8Unsafe()); | 125 gin::V8Initializer::GetNativesFilePath().AsUTF8Unsafe()); |
126 base::android::RegisterApkAssetWithGlobalDescriptors( | 126 base::android::RegisterApkAssetWithGlobalDescriptors( |
127 kV8SnapshotDataDescriptor32, | 127 kV8SnapshotDataDescriptor32, |
128 gin::V8Initializer::GetSnapshotFilePath(true).AsUTF8Unsafe()); | 128 gin::V8Initializer::GetSnapshotFilePath(true).AsUTF8Unsafe()); |
129 | |
130 base::android::RegisterApkAssetWithGlobalDescriptors( | |
131 kV8NativesDataDescriptor64, | |
132 gin::V8Initializer::GetNativesFilePath(false).AsUTF8Unsafe()); | |
133 base::android::RegisterApkAssetWithGlobalDescriptors( | 129 base::android::RegisterApkAssetWithGlobalDescriptors( |
134 kV8SnapshotDataDescriptor64, | 130 kV8SnapshotDataDescriptor64, |
135 gin::V8Initializer::GetSnapshotFilePath(false).AsUTF8Unsafe()); | 131 gin::V8Initializer::GetSnapshotFilePath(false).AsUTF8Unsafe()); |
136 } | 132 } |
137 | 133 |
138 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) { | 134 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) { |
139 cl->AppendSwitch(switches::kInProcessGPU); | 135 cl->AppendSwitch(switches::kInProcessGPU); |
140 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); | 136 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); |
141 cl->AppendSwitch(switches::kDisableRendererBackgrounding); | 137 cl->AppendSwitch(switches::kDisableRendererBackgrounding); |
142 } | 138 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 #if defined(VIDEO_HOLE) | 263 #if defined(VIDEO_HOLE) |
268 content::ExternalVideoSurfaceContainer* | 264 content::ExternalVideoSurfaceContainer* |
269 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 265 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
270 content::WebContents* web_contents) { | 266 content::WebContents* web_contents) { |
271 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 267 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
272 web_contents); | 268 web_contents); |
273 } | 269 } |
274 #endif | 270 #endif |
275 | 271 |
276 } // namespace android_webview | 272 } // namespace android_webview |
OLD | NEW |