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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_gtk.cc » ('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 (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/shell.h" 5 #include "content/shell/shell.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 27 matching lines...) Expand all
38 38
39 std::vector<Shell*> Shell::windows_; 39 std::vector<Shell*> Shell::windows_;
40 base::Callback<void(Shell*)> Shell::shell_created_callback_; 40 base::Callback<void(Shell*)> Shell::shell_created_callback_;
41 41
42 bool Shell::quit_message_loop_ = true; 42 bool Shell::quit_message_loop_ = true;
43 43
44 Shell::Shell(WebContents* web_contents) 44 Shell::Shell(WebContents* web_contents)
45 : dev_tools_(NULL), 45 : dev_tools_(NULL),
46 is_fullscreen_(false), 46 is_fullscreen_(false),
47 window_(NULL), 47 window_(NULL),
48 url_edit_view_(NULL) 48 url_edit_view_(NULL),
49 #if defined(OS_WIN) && !defined(USE_AURA) 49 #if defined(OS_WIN) && !defined(USE_AURA)
50 , default_edit_wnd_proc_(0) 50 default_edit_wnd_proc_(0),
51 #endif 51 #endif
52 { 52 headless_(false) {
53 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
54 if (command_line.HasSwitch(switches::kDumpRenderTree) &&
55 !command_line.HasSwitch(switches::kShowContentShell)) {
56 headless_ = true;
57 }
53 registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED, 58 registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
54 Source<WebContents>(web_contents)); 59 Source<WebContents>(web_contents));
55 windows_.push_back(this); 60 windows_.push_back(this);
56 61
57 if (!shell_created_callback_.is_null()) { 62 if (!shell_created_callback_.is_null()) {
58 shell_created_callback_.Run(this); 63 shell_created_callback_.Run(this);
59 shell_created_callback_.Reset(); 64 shell_created_callback_.Reset();
60 } 65 }
61 } 66 }
62 67
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 Details<std::pair<NavigationEntry*, bool> >(details).ptr(); 300 Details<std::pair<NavigationEntry*, bool> >(details).ptr();
296 301
297 if (title->first) { 302 if (title->first) {
298 string16 text = title->first->GetTitle(); 303 string16 text = title->first->GetTitle();
299 PlatformSetTitle(text); 304 PlatformSetTitle(text);
300 } 305 }
301 } 306 }
302 } 307 }
303 308
304 } // namespace content 309 } // namespace content
OLDNEW
« 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