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> |
| 8 |
7 #include "android_webview/browser/aw_content_browser_client.h" | 9 #include "android_webview/browser/aw_content_browser_client.h" |
8 #include "android_webview/browser/browser_view_renderer.h" | 10 #include "android_webview/browser/browser_view_renderer.h" |
9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 11 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
10 #include "android_webview/common/aw_descriptors.h" | 12 #include "android_webview/common/aw_descriptors.h" |
11 #include "android_webview/common/aw_switches.h" | 13 #include "android_webview/common/aw_switches.h" |
12 #include "android_webview/crash_reporter/aw_microdump_crash_reporter.h" | 14 #include "android_webview/crash_reporter/aw_microdump_crash_reporter.h" |
13 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" | 15 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
14 #include "android_webview/native/aw_locale_manager_impl.h" | 16 #include "android_webview/native/aw_locale_manager_impl.h" |
15 #include "android_webview/native/aw_media_url_interceptor.h" | 17 #include "android_webview/native/aw_media_url_interceptor.h" |
16 #include "android_webview/native/aw_message_port_service_impl.h" | 18 #include "android_webview/native/aw_message_port_service_impl.h" |
17 #include "android_webview/native/aw_quota_manager_bridge_impl.h" | 19 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
18 #include "android_webview/native/aw_web_contents_view_delegate.h" | 20 #include "android_webview/native/aw_web_contents_view_delegate.h" |
19 #include "android_webview/native/aw_web_preferences_populater_impl.h" | 21 #include "android_webview/native/aw_web_preferences_populater_impl.h" |
20 #include "android_webview/renderer/aw_content_renderer_client.h" | 22 #include "android_webview/renderer/aw_content_renderer_client.h" |
21 #include "base/android/apk_assets.h" | 23 #include "base/android/apk_assets.h" |
22 #include "base/command_line.h" | 24 #include "base/command_line.h" |
23 #include "base/cpu.h" | 25 #include "base/cpu.h" |
24 #include "base/i18n/icu_util.h" | 26 #include "base/i18n/icu_util.h" |
25 #include "base/lazy_instance.h" | 27 #include "base/lazy_instance.h" |
26 #include "base/logging.h" | 28 #include "base/logging.h" |
27 #include "base/memory/scoped_ptr.h" | |
28 #include "base/threading/thread_restrictions.h" | 29 #include "base/threading/thread_restrictions.h" |
29 #include "cc/base/switches.h" | 30 #include "cc/base/switches.h" |
30 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" | 31 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" |
31 #include "content/public/browser/android/browser_media_player_manager_register.h
" | 32 #include "content/public/browser/android/browser_media_player_manager_register.h
" |
32 #include "content/public/browser/browser_main_runner.h" | 33 #include "content/public/browser/browser_main_runner.h" |
33 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
34 #include "content/public/common/content_descriptors.h" | 35 #include "content/public/common/content_descriptors.h" |
35 #include "content/public/common/content_switches.h" | 36 #include "content/public/common/content_switches.h" |
36 #include "gin/public/isolate_holder.h" | 37 #include "gin/public/isolate_holder.h" |
37 #include "gin/v8_initializer.h" | 38 #include "gin/v8_initializer.h" |
38 #include "gpu/command_buffer/client/gl_in_process_context.h" | 39 #include "gpu/command_buffer/client/gl_in_process_context.h" |
39 #include "gpu/command_buffer/service/gpu_switches.h" | 40 #include "gpu/command_buffer/service/gpu_switches.h" |
40 #include "media/base/media_switches.h" | 41 #include "media/base/media_switches.h" |
41 #include "ui/base/resource/resource_bundle.h" | 42 #include "ui/base/resource/resource_bundle.h" |
42 #include "ui/events/gesture_detection/gesture_configuration.h" | 43 #include "ui/events/gesture_detection/gesture_configuration.h" |
43 | 44 |
44 namespace android_webview { | 45 namespace android_webview { |
45 | 46 |
46 namespace { | 47 namespace { |
47 | 48 |
48 // TODO(boliu): Remove this global Allow once the underlying issues are | 49 // TODO(boliu): Remove this global Allow once the underlying issues are |
49 // resolved - http://crbug.com/240453. See AwMainDelegate::RunProcess below. | 50 // resolved - http://crbug.com/240453. See AwMainDelegate::RunProcess below. |
50 base::LazyInstance<scoped_ptr<ScopedAllowWaitForLegacyWebViewApi> > | 51 base::LazyInstance<std::unique_ptr<ScopedAllowWaitForLegacyWebViewApi>> |
51 g_allow_wait_in_ui_thread = LAZY_INSTANCE_INITIALIZER; | 52 g_allow_wait_in_ui_thread = LAZY_INSTANCE_INITIALIZER; |
52 | |
53 } | 53 } |
54 | 54 |
55 AwMainDelegate::AwMainDelegate() { | 55 AwMainDelegate::AwMainDelegate() { |
56 } | 56 } |
57 | 57 |
58 AwMainDelegate::~AwMainDelegate() { | 58 AwMainDelegate::~AwMainDelegate() { |
59 } | 59 } |
60 | 60 |
61 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { | 61 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { |
62 content::SetContentClient(&content_client_); | 62 content::SetContentClient(&content_client_); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 #if defined(VIDEO_HOLE) | 249 #if defined(VIDEO_HOLE) |
250 content::ExternalVideoSurfaceContainer* | 250 content::ExternalVideoSurfaceContainer* |
251 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 251 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
252 content::WebContents* web_contents) { | 252 content::WebContents* web_contents) { |
253 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 253 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
254 web_contents); | 254 web_contents); |
255 } | 255 } |
256 #endif | 256 #endif |
257 | 257 |
258 } // namespace android_webview | 258 } // namespace android_webview |
OLD | NEW |