| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |