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

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

Issue 1890223002: Explicitly initialize secondary renderers for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 8 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
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.h" 5 #include "content/shell/browser/shell.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 14 matching lines...) Expand all
25 #include "content/public/browser/web_contents.h" 25 #include "content/public/browser/web_contents.h"
26 #include "content/public/browser/web_contents_observer.h" 26 #include "content/public/browser/web_contents_observer.h"
27 #include "content/public/common/bindings_policy.h" 27 #include "content/public/common/bindings_policy.h"
28 #include "content/public/common/content_switches.h" 28 #include "content/public/common/content_switches.h"
29 #include "content/public/common/renderer_preferences.h" 29 #include "content/public/common/renderer_preferences.h"
30 #include "content/public/common/webrtc_ip_handling_policy.h" 30 #include "content/public/common/webrtc_ip_handling_policy.h"
31 #include "content/shell/browser/layout_test/blink_test_controller.h" 31 #include "content/shell/browser/layout_test/blink_test_controller.h"
32 #include "content/shell/browser/layout_test/layout_test_bluetooth_chooser_factor y.h" 32 #include "content/shell/browser/layout_test/layout_test_bluetooth_chooser_factor y.h"
33 #include "content/shell/browser/layout_test/layout_test_devtools_frontend.h" 33 #include "content/shell/browser/layout_test/layout_test_devtools_frontend.h"
34 #include "content/shell/browser/layout_test/layout_test_javascript_dialog_manage r.h" 34 #include "content/shell/browser/layout_test/layout_test_javascript_dialog_manage r.h"
35 #include "content/shell/browser/layout_test/notify_done_forwarder.h" 35 #include "content/shell/browser/layout_test/secondary_test_window_observer.h"
36 #include "content/shell/browser/shell_browser_main_parts.h" 36 #include "content/shell/browser/shell_browser_main_parts.h"
37 #include "content/shell/browser/shell_content_browser_client.h" 37 #include "content/shell/browser/shell_content_browser_client.h"
38 #include "content/shell/browser/shell_devtools_frontend.h" 38 #include "content/shell/browser/shell_devtools_frontend.h"
39 #include "content/shell/browser/shell_javascript_dialog_manager.h" 39 #include "content/shell/browser/shell_javascript_dialog_manager.h"
40 #include "content/shell/common/shell_messages.h" 40 #include "content/shell/common/shell_messages.h"
41 #include "content/shell/common/shell_switches.h" 41 #include "content/shell/common/shell_switches.h"
42 42
43 namespace content { 43 namespace content {
44 44
45 const int kDefaultTestWindowWidthDip = 800; 45 const int kDefaultTestWindowWidthDip = 800;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 245 }
246 246
247 void Shell::AddNewContents(WebContents* source, 247 void Shell::AddNewContents(WebContents* source,
248 WebContents* new_contents, 248 WebContents* new_contents,
249 WindowOpenDisposition disposition, 249 WindowOpenDisposition disposition,
250 const gfx::Rect& initial_rect, 250 const gfx::Rect& initial_rect,
251 bool user_gesture, 251 bool user_gesture,
252 bool* was_blocked) { 252 bool* was_blocked) {
253 CreateShell(new_contents, AdjustWindowSize(initial_rect.size())); 253 CreateShell(new_contents, AdjustWindowSize(initial_rect.size()));
254 if (switches::IsRunLayoutTestSwitchPresent()) 254 if (switches::IsRunLayoutTestSwitchPresent())
255 NotifyDoneForwarder::CreateForWebContents(new_contents); 255 SecondaryTestWindowObserver::CreateForWebContents(new_contents);
256 } 256 }
257 257
258 void Shell::GoBackOrForward(int offset) { 258 void Shell::GoBackOrForward(int offset) {
259 web_contents_->GetController().GoToOffset(offset); 259 web_contents_->GetController().GoToOffset(offset);
260 web_contents_->Focus(); 260 web_contents_->Focus();
261 } 261 }
262 262
263 void Shell::Reload() { 263 void Shell::Reload() {
264 web_contents_->GetController().Reload(false); 264 web_contents_->GetController().Reload(false);
265 web_contents_->Focus(); 265 web_contents_->Focus();
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 devtools_frontend_->Activate(); 479 devtools_frontend_->Activate();
480 devtools_frontend_->Focus(); 480 devtools_frontend_->Focus();
481 } 481 }
482 482
483 void Shell::OnDevToolsWebContentsDestroyed() { 483 void Shell::OnDevToolsWebContentsDestroyed() {
484 devtools_observer_.reset(); 484 devtools_observer_.reset();
485 devtools_frontend_ = NULL; 485 devtools_frontend_ = NULL;
486 } 486 }
487 487
488 } // namespace content 488 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/secondary_test_window_observer.cc ('k') | content/shell/common/shell_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698