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

Unified Diff: content/shell/shell.cc

Issue 11576003: [content shell] run headless when in layout test mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell.cc
diff --git a/content/shell/shell.cc b/content/shell/shell.cc
index f21b6f9c854cc82b9c5e4d6c789f9d80cc68ae5d..a89af8a83914ba33d46b476f98c004201533f752 100644
--- a/content/shell/shell.cc
+++ b/content/shell/shell.cc
@@ -45,11 +45,16 @@ Shell::Shell(WebContents* web_contents)
: dev_tools_(NULL),
is_fullscreen_(false),
window_(NULL),
- url_edit_view_(NULL)
+ url_edit_view_(NULL),
#if defined(OS_WIN) && !defined(USE_AURA)
- , default_edit_wnd_proc_(0)
+ default_edit_wnd_proc_(0),
#endif
- {
+ headless_(false) {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kDumpRenderTree) &&
+ !command_line.HasSwitch(switches::kShowContentShell)) {
+ headless_ = true;
+ }
registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
Source<WebContents>(web_contents));
windows_.push_back(this);
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698