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 #include "content/test/web_contents_observer_sanity_checker.h" | 5 #include "content/test/web_contents_observer_sanity_checker.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
10 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 AssertRenderFrameExists(render_frame_host); | 237 AssertRenderFrameExists(render_frame_host); |
238 } | 238 } |
239 | 239 |
240 void WebContentsObserverSanityChecker::DidOpenRequestedURL( | 240 void WebContentsObserverSanityChecker::DidOpenRequestedURL( |
241 WebContents* new_contents, | 241 WebContents* new_contents, |
242 RenderFrameHost* source_render_frame_host, | 242 RenderFrameHost* source_render_frame_host, |
243 const GURL& url, | 243 const GURL& url, |
244 const Referrer& referrer, | 244 const Referrer& referrer, |
245 WindowOpenDisposition disposition, | 245 WindowOpenDisposition disposition, |
246 ui::PageTransition transition, | 246 ui::PageTransition transition, |
247 bool started_from_context_menu) { | 247 bool started_from_context_menu, |
| 248 bool renderer_initiated) { |
248 AssertRenderFrameExists(source_render_frame_host); | 249 AssertRenderFrameExists(source_render_frame_host); |
249 } | 250 } |
250 | 251 |
251 void WebContentsObserverSanityChecker::MediaStartedPlaying( | 252 void WebContentsObserverSanityChecker::MediaStartedPlaying( |
252 const MediaPlayerInfo& media_info, | 253 const MediaPlayerInfo& media_info, |
253 const MediaPlayerId& id) { | 254 const MediaPlayerId& id) { |
254 CHECK(!web_contents_destroyed_); | 255 CHECK(!web_contents_destroyed_); |
255 CHECK(std::find(active_media_players_.begin(), active_media_players_.end(), | 256 CHECK(std::find(active_media_players_.begin(), active_media_players_.end(), |
256 id) == active_media_players_.end()); | 257 id) == active_media_players_.end()); |
257 active_media_players_.push_back(id); | 258 active_media_players_.push_back(id); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 if (live_routes_.count(entry.first)) | 372 if (live_routes_.count(entry.first)) |
372 return true; | 373 return true; |
373 if (current_hosts_.count(entry.first)) | 374 if (current_hosts_.count(entry.first)) |
374 return true; | 375 return true; |
375 } | 376 } |
376 } | 377 } |
377 return false; | 378 return false; |
378 } | 379 } |
379 | 380 |
380 } // namespace content | 381 } // namespace content |
OLD | NEW |