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

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

Issue 2085023003: Simplify detection of new, test-related RenderFrameHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « content/shell/browser/layout_test/secondary_test_window_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/layout_test/secondary_test_window_observer.h" 5 #include "content/shell/browser/layout_test/secondary_test_window_observer.h"
6 6
7 #include "content/public/browser/render_frame_host.h" 7 #include "content/public/browser/render_frame_host.h"
8 #include "content/shell/browser/layout_test/blink_test_controller.h" 8 #include "content/shell/browser/layout_test/blink_test_controller.h"
9 #include "content/shell/common/shell_messages.h" 9 #include "content/shell/common/shell_messages.h"
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 SecondaryTestWindowObserver::~SecondaryTestWindowObserver() {} 29 SecondaryTestWindowObserver::~SecondaryTestWindowObserver() {}
30 30
31 void SecondaryTestWindowObserver::RenderFrameCreated( 31 void SecondaryTestWindowObserver::RenderFrameCreated(
32 RenderFrameHost* render_frame_host) { 32 RenderFrameHost* render_frame_host) {
33 DCHECK(!BlinkTestController::Get()->IsMainWindow( 33 DCHECK(!BlinkTestController::Get()->IsMainWindow(
34 WebContents::FromRenderFrameHost(render_frame_host))); 34 WebContents::FromRenderFrameHost(render_frame_host)));
35 BlinkTestController::Get()->HandleNewRenderFrameHost(render_frame_host); 35 BlinkTestController::Get()->HandleNewRenderFrameHost(render_frame_host);
36 } 36 }
37 37
38 void SecondaryTestWindowObserver::RenderFrameHostChanged(
39 RenderFrameHost* old_host,
40 RenderFrameHost* new_host) {
41 DCHECK(!BlinkTestController::Get()->IsMainWindow(
42 WebContents::FromRenderFrameHost(new_host)));
43 BlinkTestController::Get()->HandleNewRenderFrameHost(new_host);
44 }
45
46 } // namespace content 38 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/secondary_test_window_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698