Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 1185563002: Add --dump-line-box-trees parameter to content_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add braces to if one-liners. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/test_runner/web_test_proxy.cc ('k') | content/shell/common/shell_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.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.h" 9 #include "base/files/file.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 command_line->AppendSwitch(::switches::kV8SnapshotPassedByFD); 219 command_line->AppendSwitch(::switches::kV8SnapshotPassedByFD);
220 } 220 }
221 #endif // V8_USE_EXTERNAL_STARTUP_DATA 221 #endif // V8_USE_EXTERNAL_STARTUP_DATA
222 #endif // OS_POSIX && !OS_MACOSX 222 #endif // OS_POSIX && !OS_MACOSX
223 } 223 }
224 224
225 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( 225 void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
226 base::CommandLine* command_line, 226 base::CommandLine* command_line,
227 int child_process_id) { 227 int child_process_id) {
228 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 228 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
229 switches::kRunLayoutTest)) 229 switches::kRunLayoutTest)) {
230 command_line->AppendSwitch(switches::kRunLayoutTest); 230 command_line->AppendSwitch(switches::kRunLayoutTest);
231 }
231 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 232 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
232 switches::kEnableFontAntialiasing)) 233 switches::kDumpLineBoxTrees)) {
234 command_line->AppendSwitch(switches::kDumpLineBoxTrees);
235 }
236 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
237 switches::kEnableFontAntialiasing)) {
233 command_line->AppendSwitch(switches::kEnableFontAntialiasing); 238 command_line->AppendSwitch(switches::kEnableFontAntialiasing);
239 }
234 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 240 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
235 switches::kExposeInternalsForTesting)) 241 switches::kExposeInternalsForTesting)) {
236 command_line->AppendSwitch(switches::kExposeInternalsForTesting); 242 command_line->AppendSwitch(switches::kExposeInternalsForTesting);
243 }
237 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 244 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
238 switches::kExposeIpcEcho)) 245 switches::kExposeIpcEcho)) {
239 command_line->AppendSwitch(switches::kExposeIpcEcho); 246 command_line->AppendSwitch(switches::kExposeIpcEcho);
247 }
240 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 248 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
241 switches::kStableReleaseMode)) 249 switches::kStableReleaseMode)) {
242 command_line->AppendSwitch(switches::kStableReleaseMode); 250 command_line->AppendSwitch(switches::kStableReleaseMode);
251 }
243 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 252 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
244 switches::kEnableCrashReporter)) { 253 switches::kEnableCrashReporter)) {
245 command_line->AppendSwitch(switches::kEnableCrashReporter); 254 command_line->AppendSwitch(switches::kEnableCrashReporter);
246 } 255 }
247 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 256 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
248 switches::kCrashDumpsDir)) { 257 switches::kCrashDumpsDir)) {
249 command_line->AppendSwitchPath( 258 command_line->AppendSwitchPath(
250 switches::kCrashDumpsDir, 259 switches::kCrashDumpsDir,
251 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( 260 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
252 switches::kCrashDumpsDir)); 261 switches::kCrashDumpsDir));
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 ShellBrowserContext* 442 ShellBrowserContext*
434 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 443 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
435 BrowserContext* content_browser_context) { 444 BrowserContext* content_browser_context) {
436 if (content_browser_context == browser_context()) 445 if (content_browser_context == browser_context())
437 return browser_context(); 446 return browser_context();
438 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 447 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
439 return off_the_record_browser_context(); 448 return off_the_record_browser_context();
440 } 449 }
441 450
442 } // namespace content 451 } // namespace content
OLDNEW
« no previous file with comments | « components/test_runner/web_test_proxy.cc ('k') | content/shell/common/shell_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698