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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 bool was_ignored_by_handler) { | 236 bool was_ignored_by_handler) { |
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 AssertRenderFrameExists(source_render_frame_host); | 248 AssertRenderFrameExists(source_render_frame_host); |
248 } | 249 } |
249 | 250 |
250 void WebContentsObserverSanityChecker::MediaStartedPlaying( | 251 void WebContentsObserverSanityChecker::MediaStartedPlaying( |
251 const MediaPlayerInfo& media_info, | 252 const MediaPlayerInfo& media_info, |
252 const MediaPlayerId& id) { | 253 const MediaPlayerId& id) { |
253 CHECK(!web_contents_destroyed_); | 254 CHECK(!web_contents_destroyed_); |
254 CHECK(std::find(active_media_players_.begin(), active_media_players_.end(), | 255 CHECK(std::find(active_media_players_.begin(), active_media_players_.end(), |
255 id) == active_media_players_.end()); | 256 id) == active_media_players_.end()); |
256 active_media_players_.push_back(id); | 257 active_media_players_.push_back(id); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 if (live_routes_.count(entry.first)) | 371 if (live_routes_.count(entry.first)) |
371 return true; | 372 return true; |
372 if (current_hosts_.count(entry.first)) | 373 if (current_hosts_.count(entry.first)) |
373 return true; | 374 return true; |
374 } | 375 } |
375 } | 376 } |
376 return false; | 377 return false; |
377 } | 378 } |
378 | 379 |
379 } // namespace content | 380 } // namespace content |
OLD | NEW |