| 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/gpu_memory_buffer_factory_impl.h" | 9 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" |
| 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
| 11 #include "android_webview/common/aw_switches.h" |
| 11 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" | 12 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
| 12 #include "android_webview/native/aw_quota_manager_bridge_impl.h" | 13 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
| 13 #include "android_webview/native/aw_web_contents_view_delegate.h" | 14 #include "android_webview/native/aw_web_contents_view_delegate.h" |
| 14 #include "android_webview/native/aw_web_preferences_populater_impl.h" | 15 #include "android_webview/native/aw_web_preferences_populater_impl.h" |
| 15 #include "android_webview/native/external_video_surface_container_impl.h" | 16 #include "android_webview/native/external_video_surface_container_impl.h" |
| 16 #include "android_webview/renderer/aw_content_renderer_client.h" | 17 #include "android_webview/renderer/aw_content_renderer_client.h" |
| 17 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 18 #include "base/cpu.h" | 19 #include "base/cpu.h" |
| 19 #include "base/lazy_instance.h" | 20 #include "base/lazy_instance.h" |
| 20 #include "base/logging.h" | 21 #include "base/logging.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // File system API not supported (requires some new API; internal bug 6930981) | 69 // File system API not supported (requires some new API; internal bug 6930981) |
| 69 cl->AppendSwitch(switches::kDisableFileSystem); | 70 cl->AppendSwitch(switches::kDisableFileSystem); |
| 70 | 71 |
| 71 #if defined(VIDEO_HOLE) | 72 #if defined(VIDEO_HOLE) |
| 72 // Support EME/L1 with hole-punching. | 73 // Support EME/L1 with hole-punching. |
| 73 cl->AppendSwitch(switches::kMediaDrmEnableNonCompositing); | 74 cl->AppendSwitch(switches::kMediaDrmEnableNonCompositing); |
| 74 #endif | 75 #endif |
| 75 | 76 |
| 76 // WebRTC hardware decoding is not supported, internal bug 15075307 | 77 // WebRTC hardware decoding is not supported, internal bug 15075307 |
| 77 cl->AppendSwitch(switches::kDisableWebRtcHWDecoding); | 78 cl->AppendSwitch(switches::kDisableWebRtcHWDecoding); |
| 79 |
| 80 if (cl->HasSwitch(switches::kDisableRecordDocumentWorkaround)) |
| 81 content::SynchronousCompositor::DisableRecordFullLayer(); |
| 82 |
| 78 return false; | 83 return false; |
| 79 } | 84 } |
| 80 | 85 |
| 81 void AwMainDelegate::PreSandboxStartup() { | 86 void AwMainDelegate::PreSandboxStartup() { |
| 82 // TODO(torne): When we have a separate renderer process, we need to handle | 87 // TODO(torne): When we have a separate renderer process, we need to handle |
| 83 // being passed open FDs for the resource paks here. | 88 // being passed open FDs for the resource paks here. |
| 84 #if defined(ARCH_CPU_ARM_FAMILY) | 89 #if defined(ARCH_CPU_ARM_FAMILY) |
| 85 // Create an instance of the CPU class to parse /proc/cpuinfo and cache | 90 // Create an instance of the CPU class to parse /proc/cpuinfo and cache |
| 86 // cpu_brand info. | 91 // cpu_brand info. |
| 87 base::CPU cpu_info; | 92 base::CPU cpu_info; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 152 |
| 148 #if defined(VIDEO_HOLE) | 153 #if defined(VIDEO_HOLE) |
| 149 content::ExternalVideoSurfaceContainer* | 154 content::ExternalVideoSurfaceContainer* |
| 150 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 155 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
| 151 content::WebContents* web_contents) { | 156 content::WebContents* web_contents) { |
| 152 return new ExternalVideoSurfaceContainerImpl(web_contents); | 157 return new ExternalVideoSurfaceContainerImpl(web_contents); |
| 153 } | 158 } |
| 154 #endif | 159 #endif |
| 155 | 160 |
| 156 } // namespace android_webview | 161 } // namespace android_webview |
| OLD | NEW |