| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 observer_->OnEnteredFullscreen(); | 358 observer_->OnEnteredFullscreen(); |
| 359 } | 359 } |
| 360 | 360 |
| 361 void WebMediaPlayerImpl::exitedFullscreen() { | 361 void WebMediaPlayerImpl::exitedFullscreen() { |
| 362 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_) | 362 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_) |
| 363 DisableOverlay(); | 363 DisableOverlay(); |
| 364 if (observer_) | 364 if (observer_) |
| 365 observer_->OnExitedFullscreen(); | 365 observer_->OnExitedFullscreen(); |
| 366 } | 366 } |
| 367 | 367 |
| 368 void WebMediaPlayerImpl::becameDominantVisibleContent(bool isDominant) { |
| 369 if (observer_) |
| 370 observer_->OnBecameDominantVisibleContent(isDominant); |
| 371 } |
| 372 |
| 368 void WebMediaPlayerImpl::DoLoad(LoadType load_type, | 373 void WebMediaPlayerImpl::DoLoad(LoadType load_type, |
| 369 const blink::WebURL& url, | 374 const blink::WebURL& url, |
| 370 CORSMode cors_mode) { | 375 CORSMode cors_mode) { |
| 371 DVLOG(1) << __func__; | 376 DVLOG(1) << __func__; |
| 372 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 377 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 373 | 378 |
| 374 GURL gurl(url); | 379 GURL gurl(url); |
| 375 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin()); | 380 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin()); |
| 376 | 381 |
| 377 // Set subresource URL for crash reporting. | 382 // Set subresource URL for crash reporting. |
| (...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1981 watch_time_reporter_->OnShown(); | 1986 watch_time_reporter_->OnShown(); |
| 1982 } | 1987 } |
| 1983 | 1988 |
| 1984 bool WebMediaPlayerImpl::IsHidden() const { | 1989 bool WebMediaPlayerImpl::IsHidden() const { |
| 1985 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 1990 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 1986 | 1991 |
| 1987 return delegate_ && delegate_->IsHidden(); | 1992 return delegate_ && delegate_->IsHidden(); |
| 1988 } | 1993 } |
| 1989 | 1994 |
| 1990 } // namespace media | 1995 } // namespace media |
| OLD | NEW |