| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 observer_->OnEnteredFullscreen(); | 345 observer_->OnEnteredFullscreen(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 void WebMediaPlayerImpl::exitedFullscreen() { | 348 void WebMediaPlayerImpl::exitedFullscreen() { |
| 349 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_) | 349 if (!force_video_overlays_ && !disable_fullscreen_video_overlays_) |
| 350 DisableOverlay(); | 350 DisableOverlay(); |
| 351 if (observer_) | 351 if (observer_) |
| 352 observer_->OnExitedFullscreen(); | 352 observer_->OnExitedFullscreen(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void WebMediaPlayerImpl::videoViewportIntersectionChanged( |
| 356 const blink::WebMediaPlayer::ViewportIntersectionInfo& info) { |
| 357 MediaObserver::ViewportIntersectionInfo intersect_info; |
| 358 intersect_info.root_rect = info.rootRect; |
| 359 intersect_info.intersect_rect = info.intersectRect; |
| 360 if (observer_) |
| 361 observer_->OnVideoViewportIntersectionChanged(intersect_info); |
| 362 } |
| 363 |
| 355 void WebMediaPlayerImpl::DoLoad(LoadType load_type, | 364 void WebMediaPlayerImpl::DoLoad(LoadType load_type, |
| 356 const blink::WebURL& url, | 365 const blink::WebURL& url, |
| 357 CORSMode cors_mode) { | 366 CORSMode cors_mode) { |
| 358 DVLOG(1) << __func__; | 367 DVLOG(1) << __func__; |
| 359 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 368 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 360 | 369 |
| 361 GURL gurl(url); | 370 GURL gurl(url); |
| 362 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin()); | 371 ReportMetrics(load_type, gurl, frame_->getSecurityOrigin()); |
| 363 | 372 |
| 364 // Set subresource URL for crash reporting. | 373 // Set subresource URL for crash reporting. |
| (...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 pipeline_metadata_.natural_size, | 1902 pipeline_metadata_.natural_size, |
| 1894 base::Bind(&GetCurrentTimeInternal, this))); | 1903 base::Bind(&GetCurrentTimeInternal, this))); |
| 1895 watch_time_reporter_->OnVolumeChange(volume_); | 1904 watch_time_reporter_->OnVolumeChange(volume_); |
| 1896 if (delegate_ && delegate_->IsHidden()) | 1905 if (delegate_ && delegate_->IsHidden()) |
| 1897 watch_time_reporter_->OnHidden(); | 1906 watch_time_reporter_->OnHidden(); |
| 1898 else | 1907 else |
| 1899 watch_time_reporter_->OnShown(); | 1908 watch_time_reporter_->OnShown(); |
| 1900 } | 1909 } |
| 1901 | 1910 |
| 1902 } // namespace media | 1911 } // namespace media |
| OLD | NEW |