| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ | 5 #ifndef CONTENT_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ |
| 6 #define CONTENT_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ | 6 #define CONTENT_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 RenderFrameHost* source_render_frame_host, | 81 RenderFrameHost* source_render_frame_host, |
| 82 const GURL& url, | 82 const GURL& url, |
| 83 const Referrer& referrer, | 83 const Referrer& referrer, |
| 84 WindowOpenDisposition disposition, | 84 WindowOpenDisposition disposition, |
| 85 ui::PageTransition transition) override; | 85 ui::PageTransition transition) override; |
| 86 void MediaStartedPlaying(const MediaPlayerId& id) override; | 86 void MediaStartedPlaying(const MediaPlayerId& id) override; |
| 87 void MediaStoppedPlaying(const MediaPlayerId& id) override; | 87 void MediaStoppedPlaying(const MediaPlayerId& id) override; |
| 88 bool OnMessageReceived(const IPC::Message& message, | 88 bool OnMessageReceived(const IPC::Message& message, |
| 89 RenderFrameHost* render_frame_host) override; | 89 RenderFrameHost* render_frame_host) override; |
| 90 void WebContentsDestroyed() override; | 90 void WebContentsDestroyed() override; |
| 91 void DidStartLoading() override; | |
| 92 void DidStopLoading() override; | |
| 93 | 91 |
| 94 private: | 92 private: |
| 95 explicit WebContentsObserverSanityChecker(WebContents* web_contents); | 93 explicit WebContentsObserverSanityChecker(WebContents* web_contents); |
| 96 ~WebContentsObserverSanityChecker() override; | 94 ~WebContentsObserverSanityChecker() override; |
| 97 | 95 |
| 98 std::string Format(RenderFrameHost* render_frame_host); | 96 std::string Format(RenderFrameHost* render_frame_host); |
| 99 void AssertRenderFrameExists(RenderFrameHost* render_frame_host); | 97 void AssertRenderFrameExists(RenderFrameHost* render_frame_host); |
| 100 void AssertMainFrameExists(); | 98 void AssertMainFrameExists(); |
| 101 | 99 |
| 102 bool NavigationIsOngoing(NavigationHandle* navigation_handle); | 100 bool NavigationIsOngoing(NavigationHandle* navigation_handle); |
| 103 | 101 |
| 104 void EnsureStableParentValue(RenderFrameHost* render_frame_host); | 102 void EnsureStableParentValue(RenderFrameHost* render_frame_host); |
| 105 bool HasAnyChildren(RenderFrameHost* render_frame_host); | 103 bool HasAnyChildren(RenderFrameHost* render_frame_host); |
| 106 | 104 |
| 107 std::set<GlobalRoutingID> current_hosts_; | 105 std::set<GlobalRoutingID> current_hosts_; |
| 108 std::set<GlobalRoutingID> live_routes_; | 106 std::set<GlobalRoutingID> live_routes_; |
| 109 std::set<GlobalRoutingID> deleted_routes_; | 107 std::set<GlobalRoutingID> deleted_routes_; |
| 110 | 108 |
| 111 std::set<NavigationHandle*> ongoing_navigations_; | 109 std::set<NavigationHandle*> ongoing_navigations_; |
| 112 std::vector<MediaPlayerId> active_media_players_; | 110 std::vector<MediaPlayerId> active_media_players_; |
| 113 | 111 |
| 114 // Remembers parents to make sure RenderFrameHost::GetParent() never changes. | 112 // Remembers parents to make sure RenderFrameHost::GetParent() never changes. |
| 115 std::map<GlobalRoutingID, GlobalRoutingID> parent_ids_; | 113 std::map<GlobalRoutingID, GlobalRoutingID> parent_ids_; |
| 116 | 114 |
| 117 bool is_loading_; | |
| 118 | |
| 119 bool web_contents_destroyed_; | 115 bool web_contents_destroyed_; |
| 120 | 116 |
| 121 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverSanityChecker); | 117 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverSanityChecker); |
| 122 }; | 118 }; |
| 123 | 119 |
| 124 } // namespace content | 120 } // namespace content |
| 125 | 121 |
| 126 #endif // CONTENT_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ | 122 #endif // CONTENT_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ |
| OLD | NEW |