| 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/lib/aw_browser_dependency_factory_impl.h" | 10 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // This is needed for sharing textures across the different GL threads. | 85 // This is needed for sharing textures across the different GL threads. |
| 86 cl->AppendSwitch(switches::kEnableThreadedTextureMailboxes); | 86 cl->AppendSwitch(switches::kEnableThreadedTextureMailboxes); |
| 87 | 87 |
| 88 // This is needed to be able to mmap the V8 snapshot and ICU data file | 88 // This is needed to be able to mmap the V8 snapshot and ICU data file |
| 89 // directly from the WebView .apk. | 89 // directly from the WebView .apk. |
| 90 // This needs to be here so that it gets to run before the code in | 90 // This needs to be here so that it gets to run before the code in |
| 91 // content_main_runner that reads these values tries to do so. | 91 // content_main_runner that reads these values tries to do so. |
| 92 // In multi-process mode this code would live in | 92 // In multi-process mode this code would live in |
| 93 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess. | 93 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess. |
| 94 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 94 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 95 #ifdef __LP64__ | |
| 96 const char kNativesFileName[] = "natives_blob_64.bin"; | |
| 97 const char kSnapshotFileName[] = "snapshot_blob_64.bin"; | |
| 98 #else | |
| 99 const char kNativesFileName[] = "natives_blob_32.bin"; | |
| 100 const char kSnapshotFileName[] = "snapshot_blob_32.bin"; | |
| 101 #endif // __LP64__ | |
| 102 // TODO(gsennton) we should use | |
| 103 // gin::IsolateHolder::kNativesFileName/kSnapshotFileName | |
| 104 // here when those files have arch specific names http://crbug.com/455699 | |
| 105 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors( | 95 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors( |
| 106 kV8NativesDataDescriptor, kNativesFileName)); | 96 kV8NativesDataDescriptor, gin::IsolateHolder::kNativesFileName)); |
| 107 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors( | 97 CHECK(AwAssets::RegisterAssetWithGlobalDescriptors( |
| 108 kV8SnapshotDataDescriptor, kSnapshotFileName)); | 98 kV8SnapshotDataDescriptor, gin::IsolateHolder::kSnapshotFileName)); |
| 109 #endif | 99 #endif |
| 110 // TODO(mkosiba): make this CHECK when the android_webview_build uses an asset | 100 // TODO(mkosiba): make this CHECK when the android_webview_build uses an asset |
| 111 // from the .apk too. | 101 // from the .apk too. |
| 112 AwAssets::RegisterAssetWithGlobalDescriptors( | 102 AwAssets::RegisterAssetWithGlobalDescriptors( |
| 113 kAndroidICUDataDescriptor, base::i18n::kIcuDataFileName); | 103 kAndroidICUDataDescriptor, base::i18n::kIcuDataFileName); |
| 114 | 104 |
| 115 return false; | 105 return false; |
| 116 } | 106 } |
| 117 | 107 |
| 118 void AwMainDelegate::PreSandboxStartup() { | 108 void AwMainDelegate::PreSandboxStartup() { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 178 |
| 189 #if defined(VIDEO_HOLE) | 179 #if defined(VIDEO_HOLE) |
| 190 content::ExternalVideoSurfaceContainer* | 180 content::ExternalVideoSurfaceContainer* |
| 191 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 181 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
| 192 content::WebContents* web_contents) { | 182 content::WebContents* web_contents) { |
| 193 return new ExternalVideoSurfaceContainerImpl(web_contents); | 183 return new ExternalVideoSurfaceContainerImpl(web_contents); |
| 194 } | 184 } |
| 195 #endif | 185 #endif |
| 196 | 186 |
| 197 } // namespace android_webview | 187 } // namespace android_webview |
| OLD | NEW |