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/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 InitLogging(); | 122 InitLogging(); |
123 CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 123 CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
124 if (command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)) { | 124 if (command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)) { |
125 if (!CheckLayoutSystemDeps()) { | 125 if (!CheckLayoutSystemDeps()) { |
126 if (exit_code) | 126 if (exit_code) |
127 *exit_code = 1; | 127 *exit_code = 1; |
128 return true; | 128 return true; |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 #if defined(OS_ANDROID) | |
133 // Disable <canvas> path antialiasing for consistency with Android Chrome. | |
134 command_line.AppendSwitch(switches::kDisable2dCanvasAntialiasing); | |
135 #endif | |
136 | |
137 if (command_line.HasSwitch(switches::kDumpRenderTree)) { | 132 if (command_line.HasSwitch(switches::kDumpRenderTree)) { |
138 EnableBrowserLayoutTestMode(); | 133 EnableBrowserLayoutTestMode(); |
139 | 134 |
140 command_line.AppendSwitch(switches::kProcessPerTab); | 135 command_line.AppendSwitch(switches::kProcessPerTab); |
141 command_line.AppendSwitch(switches::kEnableLogging); | 136 command_line.AppendSwitch(switches::kEnableLogging); |
142 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 137 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
143 #if !defined(OS_ANDROID) | 138 #if !defined(OS_ANDROID) |
144 // OSMesa is not yet available for Android. http://crbug.com/248925 | 139 // OSMesa is not yet available for Android. http://crbug.com/248925 |
145 command_line.AppendSwitchASCII( | 140 command_line.AppendSwitchASCII( |
146 switches::kUseGL, gfx::kGLImplementationOSMesaName); | 141 switches::kUseGL, gfx::kGLImplementationOSMesaName); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 browser_client_.reset(new ShellContentBrowserClient); | 283 browser_client_.reset(new ShellContentBrowserClient); |
289 return browser_client_.get(); | 284 return browser_client_.get(); |
290 } | 285 } |
291 | 286 |
292 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 287 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
293 renderer_client_.reset(new ShellContentRendererClient); | 288 renderer_client_.reset(new ShellContentRendererClient); |
294 return renderer_client_.get(); | 289 return renderer_client_.get(); |
295 } | 290 } |
296 | 291 |
297 } // namespace content | 292 } // namespace content |
OLD | NEW |