Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 2684433003: Files required by a service now listed in manifest. (Closed)
Patch Set: Addressed @boliu and @jam's comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/aw_safe_browsing_config_helper.h" 10 #include "android_webview/browser/aw_safe_browsing_config_helper.h"
(...skipping 19 matching lines...) Expand all
30 #include "base/lazy_instance.h" 30 #include "base/lazy_instance.h"
31 #include "base/logging.h" 31 #include "base/logging.h"
32 #include "base/threading/thread_restrictions.h" 32 #include "base/threading/thread_restrictions.h"
33 #include "cc/base/switches.h" 33 #include "cc/base/switches.h"
34 #include "components/crash/content/app/breakpad_linux.h" 34 #include "components/crash/content/app/breakpad_linux.h"
35 #include "components/safe_browsing_db/android/safe_browsing_api_handler_bridge.h " 35 #include "components/safe_browsing_db/android/safe_browsing_api_handler_bridge.h "
36 #include "components/spellcheck/common/spellcheck_features.h" 36 #include "components/spellcheck/common/spellcheck_features.h"
37 #include "content/public/browser/android/browser_media_player_manager_register.h " 37 #include "content/public/browser/android/browser_media_player_manager_register.h "
38 #include "content/public/browser/browser_main_runner.h" 38 #include "content/public/browser/browser_main_runner.h"
39 #include "content/public/browser/browser_thread.h" 39 #include "content/public/browser/browser_thread.h"
40 #include "content/public/common/content_descriptors.h" 40 #include "content/public/common/content_descriptor_keys.h"
41 #include "content/public/common/content_features.h" 41 #include "content/public/common/content_features.h"
42 #include "content/public/common/content_switches.h" 42 #include "content/public/common/content_switches.h"
43 #include "gin/public/isolate_holder.h" 43 #include "gin/public/isolate_holder.h"
44 #include "gin/v8_initializer.h" 44 #include "gin/v8_initializer.h"
45 #include "gpu/command_buffer/service/gpu_switches.h" 45 #include "gpu/command_buffer/service/gpu_switches.h"
46 #include "gpu/ipc/gl_in_process_context.h" 46 #include "gpu/ipc/gl_in_process_context.h"
47 #include "media/base/media_switches.h" 47 #include "media/base/media_switches.h"
48 #include "media/media_features.h" 48 #include "media/media_features.h"
49 #include "ui/base/resource/resource_bundle.h" 49 #include "ui/base/resource/resource_bundle.h"
50 #include "ui/events/gesture_detection/gesture_configuration.h" 50 #include "ui/events/gesture_detection/gesture_configuration.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor()); 126 content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor());
127 BrowserViewRenderer::CalculateTileMemoryPolicy(); 127 BrowserViewRenderer::CalculateTileMemoryPolicy();
128 // WebView apps can override WebView#computeScroll to achieve custom 128 // WebView apps can override WebView#computeScroll to achieve custom
129 // scroll/fling. As a result, fling animations may not be ticked, 129 // scroll/fling. As a result, fling animations may not be ticked,
130 // potentially 130 // potentially
131 // confusing the tap suppression controller. Simply disable it for WebView 131 // confusing the tap suppression controller. Simply disable it for WebView
132 ui::GestureConfiguration::GetInstance() 132 ui::GestureConfiguration::GetInstance()
133 ->set_fling_touchscreen_tap_suppression_enabled(false); 133 ->set_fling_touchscreen_tap_suppression_enabled(false);
134 134
135 base::android::RegisterApkAssetWithGlobalDescriptors( 135 base::android::RegisterApkAssetWithFileDescriptorStore(
136 kV8NativesDataDescriptor, 136 content::kV8NativesDataDescriptor,
137 gin::V8Initializer::GetNativesFilePath().AsUTF8Unsafe()); 137 gin::V8Initializer::GetNativesFilePath().AsUTF8Unsafe());
138 base::android::RegisterApkAssetWithGlobalDescriptors( 138 base::android::RegisterApkAssetWithFileDescriptorStore(
139 kV8SnapshotDataDescriptor32, 139 content::kV8Snapshot32DataDescriptor,
140 gin::V8Initializer::GetSnapshotFilePath(true).AsUTF8Unsafe()); 140 gin::V8Initializer::GetSnapshotFilePath(true).AsUTF8Unsafe());
141 base::android::RegisterApkAssetWithGlobalDescriptors( 141 base::android::RegisterApkAssetWithFileDescriptorStore(
142 kV8SnapshotDataDescriptor64, 142 content::kV8Snapshot64DataDescriptor,
143 gin::V8Initializer::GetSnapshotFilePath(false).AsUTF8Unsafe()); 143 gin::V8Initializer::GetSnapshotFilePath(false).AsUTF8Unsafe());
144 } 144 }
145 #endif // V8_USE_EXTERNAL_STARTUP_DATA 145 #endif // V8_USE_EXTERNAL_STARTUP_DATA
146 146
147 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) { 147 if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) {
148 cl->AppendSwitch(switches::kInProcessGPU); 148 cl->AppendSwitch(switches::kInProcessGPU);
149 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); 149 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1");
150 cl->AppendSwitch(switches::kDisableRendererPriorityManagement); 150 cl->AppendSwitch(switches::kDisableRendererPriorityManagement);
151 } 151 }
152 152
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { 281 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() {
282 return new AwWebPreferencesPopulaterImpl(); 282 return new AwWebPreferencesPopulaterImpl();
283 } 283 }
284 284
285 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() { 285 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() {
286 return new AwLocaleManagerImpl(); 286 return new AwLocaleManagerImpl();
287 } 287 }
288 288
289 } // namespace android_webview 289 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/BUILD.gn ('k') | base/BUILD.gn » ('j') | base/android/apk_assets.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698