| 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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_SECONDARY_TEST_WINDOW_OBSERVER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_SECONDARY_TEST_WINDOW_OBSERVER_H_ |
| 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_SECONDARY_TEST_WINDOW_OBSERVER_H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_SECONDARY_TEST_WINDOW_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 class SecondaryTestWindowObserver | 14 class SecondaryTestWindowObserver |
| 15 : public WebContentsObserver, | 15 : public WebContentsObserver, |
| 16 public WebContentsUserData<SecondaryTestWindowObserver> { | 16 public WebContentsUserData<SecondaryTestWindowObserver> { |
| 17 public: | 17 public: |
| 18 ~SecondaryTestWindowObserver() override; | 18 ~SecondaryTestWindowObserver() override; |
| 19 | 19 |
| 20 // WebContentsObserver implementation. | 20 // WebContentsObserver implementation. |
| 21 bool OnMessageReceived(const IPC::Message& message) override; | |
| 22 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; | 21 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; |
| 23 void RenderFrameHostChanged(RenderFrameHost* old_host, | 22 void RenderFrameHostChanged(RenderFrameHost* old_host, |
| 24 RenderFrameHost* new_host) override; | 23 RenderFrameHost* new_host) override; |
| 25 | 24 |
| 26 private: | 25 private: |
| 27 friend class WebContentsUserData<SecondaryTestWindowObserver>; | 26 friend class WebContentsUserData<SecondaryTestWindowObserver>; |
| 28 | |
| 29 explicit SecondaryTestWindowObserver(WebContents* web_contents); | 27 explicit SecondaryTestWindowObserver(WebContents* web_contents); |
| 30 | 28 |
| 31 void OnTestFinishedInSecondaryRenderer(); | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(SecondaryTestWindowObserver); | 29 DISALLOW_COPY_AND_ASSIGN(SecondaryTestWindowObserver); |
| 34 }; | 30 }; |
| 35 | 31 |
| 36 } // namespace content | 32 } // namespace content |
| 37 | 33 |
| 38 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_SECONDARY_TEST_WINDOW_OBSERVER_H_ | 34 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_SECONDARY_TEST_WINDOW_OBSERVER_H_ |
| OLD | NEW |