| 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 "content/shell/app/shell_main_delegate.h" | 5 #include "content/shell/app/shell_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 command_line.AppendSwitch(switches::kProcessPerTab); | 118 command_line.AppendSwitch(switches::kProcessPerTab); |
| 119 command_line.AppendSwitch(switches::kEnableLogging); | 119 command_line.AppendSwitch(switches::kEnableLogging); |
| 120 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 120 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 121 #if !defined(OS_ANDROID) | 121 #if !defined(OS_ANDROID) |
| 122 // OSMesa is not yet available for Android. http://crbug.com/248925 | 122 // OSMesa is not yet available for Android. http://crbug.com/248925 |
| 123 command_line.AppendSwitchASCII( | 123 command_line.AppendSwitchASCII( |
| 124 switches::kUseGL, gfx::kGLImplementationOSMesaName); | 124 switches::kUseGL, gfx::kGLImplementationOSMesaName); |
| 125 #endif | 125 #endif |
| 126 command_line.AppendSwitch(switches::kSkipGpuDataLoading); | 126 command_line.AppendSwitch(switches::kSkipGpuDataLoading); |
| 127 command_line.AppendSwitch(switches::kDisableGpuVsync); | 127 command_line.AppendSwitch(switches::kDisableGpuVsync); |
| 128 command_line.AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); | |
| 129 command_line.AppendSwitch(switches::kEnableCssShaders); | |
| 130 command_line.AppendSwitchASCII(switches::kTouchEvents, | 128 command_line.AppendSwitchASCII(switches::kTouchEvents, |
| 131 switches::kTouchEventsEnabled); | 129 switches::kTouchEventsEnabled); |
| 132 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); | 130 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); |
| 133 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); | 131 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); |
| 134 #if defined(OS_ANDROID) | 132 #if defined(OS_ANDROID) |
| 135 command_line.AppendSwitch( | 133 command_line.AppendSwitch( |
| 136 switches::kDisableGestureRequirementForMediaPlayback); | 134 switches::kDisableGestureRequirementForMediaPlayback); |
| 137 // Capturing pixel results does not yet work when implementation-side | 135 // Capturing pixel results does not yet work when implementation-side |
| 138 // painting is enabled. See http://crbug.com/250777 | 136 // painting is enabled. See http://crbug.com/250777 |
| 139 command_line.AppendSwitch(cc::switches::kDisableImplSidePainting); | 137 command_line.AppendSwitch(cc::switches::kDisableImplSidePainting); |
| 140 #endif | 138 #endif |
| 141 | 139 |
| 140 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { |
| 141 command_line.AppendSwitch( |
| 142 switches::kEnableExperimentalWebPlatformFeatures); |
| 143 command_line.AppendSwitch(switches::kEnableCssShaders); |
| 144 } |
| 145 |
| 142 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing)) | 146 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing)) |
| 143 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation); | 147 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation); |
| 144 | 148 |
| 145 command_line.AppendSwitch(switches::kEnableInbandTextTracks); | 149 command_line.AppendSwitch(switches::kEnableInbandTextTracks); |
| 146 command_line.AppendSwitch(switches::kMuteAudio); | 150 command_line.AppendSwitch(switches::kMuteAudio); |
| 147 | 151 |
| 148 net::CookieMonster::EnableFileScheme(); | 152 net::CookieMonster::EnableFileScheme(); |
| 149 | 153 |
| 150 // Unless/until WebM files are added to the media layout tests, we need to | 154 // Unless/until WebM files are added to the media layout tests, we need to |
| 151 // avoid removing MP4/H264/AAC so that layout tests can run on Android. | 155 // avoid removing MP4/H264/AAC so that layout tests can run on Android. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 browser_client_.reset(new ShellContentBrowserClient); | 225 browser_client_.reset(new ShellContentBrowserClient); |
| 222 return browser_client_.get(); | 226 return browser_client_.get(); |
| 223 } | 227 } |
| 224 | 228 |
| 225 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 229 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
| 226 renderer_client_.reset(new ShellContentRendererClient); | 230 renderer_client_.reset(new ShellContentRendererClient); |
| 227 return renderer_client_.get(); | 231 return renderer_client_.get(); |
| 228 } | 232 } |
| 229 | 233 |
| 230 } // namespace content | 234 } // namespace content |
| OLD | NEW |