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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 *exit_code = 1; | 113 *exit_code = 1; |
114 return true; | 114 return true; |
115 } | 115 } |
116 } | 116 } |
117 if (command_line.HasSwitch(switches::kDumpRenderTree)) { | 117 if (command_line.HasSwitch(switches::kDumpRenderTree)) { |
118 EnableBrowserLayoutTestMode(); | 118 EnableBrowserLayoutTestMode(); |
119 | 119 |
120 command_line.AppendSwitch(switches::kProcessPerTab); | 120 command_line.AppendSwitch(switches::kProcessPerTab); |
121 command_line.AppendSwitch(switches::kEnableLogging); | 121 command_line.AppendSwitch(switches::kEnableLogging); |
122 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 122 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
123 #if !defined(OS_ANDROID) | |
124 // OSMesa is not yet available for Android. http://crbug.com/248925 | |
125 command_line.AppendSwitchASCII( | 123 command_line.AppendSwitchASCII( |
126 switches::kUseGL, gfx::kGLImplementationOSMesaName); | 124 switches::kUseGL, gfx::kGLImplementationOSMesaName); |
127 #endif | |
128 command_line.AppendSwitch(switches::kSkipGpuDataLoading); | 125 command_line.AppendSwitch(switches::kSkipGpuDataLoading); |
129 command_line.AppendSwitchASCII(switches::kTouchEvents, | 126 command_line.AppendSwitchASCII(switches::kTouchEvents, |
130 switches::kTouchEventsEnabled); | 127 switches::kTouchEventsEnabled); |
131 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); | 128 command_line.AppendSwitch(switches::kEnableGestureTapHighlight); |
132 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); | 129 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); |
133 #if defined(OS_ANDROID) | 130 #if defined(OS_ANDROID) |
134 command_line.AppendSwitch( | 131 command_line.AppendSwitch( |
135 switches::kDisableGestureRequirementForMediaPlayback); | 132 switches::kDisableGestureRequirementForMediaPlayback); |
136 // Capturing pixel results does not yet work when implementation-side | |
137 // painting is enabled. See http://crbug.com/250777 | |
138 command_line.AppendSwitch(cc::switches::kDisableImplSidePainting); | |
139 #endif | 133 #endif |
140 | 134 |
141 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { | 135 if (!command_line.HasSwitch(switches::kStableReleaseMode)) { |
142 command_line.AppendSwitch( | 136 command_line.AppendSwitch( |
143 switches::kEnableExperimentalWebPlatformFeatures); | 137 switches::kEnableExperimentalWebPlatformFeatures); |
144 command_line.AppendSwitch(switches::kEnableCssShaders); | 138 command_line.AppendSwitch(switches::kEnableCssShaders); |
145 } | 139 } |
146 | 140 |
147 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing)) | 141 if (!command_line.HasSwitch(switches::kEnableThreadedCompositing)) |
148 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation); | 142 command_line.AppendSwitch(cc::switches::kDisableThreadedAnimation); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 browser_client_.reset(new ShellContentBrowserClient); | 220 browser_client_.reset(new ShellContentBrowserClient); |
227 return browser_client_.get(); | 221 return browser_client_.get(); |
228 } | 222 } |
229 | 223 |
230 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 224 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
231 renderer_client_.reset(new ShellContentRendererClient); | 225 renderer_client_.reset(new ShellContentRendererClient); |
232 return renderer_client_.get(); | 226 return renderer_client_.get(); |
233 } | 227 } |
234 | 228 |
235 } // namespace content | 229 } // namespace content |
OLD | NEW |