| 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 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 return video_weblayer_->Bounds(); | 1611 return video_weblayer_->Bounds(); |
| 1612 } | 1612 } |
| 1613 | 1613 |
| 1614 void WebMediaPlayerImpl::SetDeviceScaleFactor(float scale_factor) { | 1614 void WebMediaPlayerImpl::SetDeviceScaleFactor(float scale_factor) { |
| 1615 cast_impl_.SetDeviceScaleFactor(scale_factor); | 1615 cast_impl_.SetDeviceScaleFactor(scale_factor); |
| 1616 } | 1616 } |
| 1617 | 1617 |
| 1618 void WebMediaPlayerImpl::SetUseFallbackPath(bool use_fallback_path) { | 1618 void WebMediaPlayerImpl::SetUseFallbackPath(bool use_fallback_path) { |
| 1619 use_fallback_path_ = use_fallback_path; | 1619 use_fallback_path_ = use_fallback_path; |
| 1620 } | 1620 } |
| 1621 #endif // defined(OS_ANDROID) // WMPI_CAST | |
| 1622 | 1621 |
| 1623 void WebMediaPlayerImpl::SetPoster(const blink::WebURL& poster) { | 1622 void WebMediaPlayerImpl::SetPoster(const blink::WebURL& poster) { |
| 1624 #if defined(OS_ANDROID) | |
| 1625 cast_impl_.setPoster(poster); | 1623 cast_impl_.setPoster(poster); |
| 1626 #endif | |
| 1627 | |
| 1628 if (observer_) | |
| 1629 observer_->OnSetPoster(poster); | |
| 1630 } | 1624 } |
| 1625 #endif // defined(OS_ANDROID) // WMPI_CAST |
| 1631 | 1626 |
| 1632 void WebMediaPlayerImpl::DataSourceInitialized(bool success) { | 1627 void WebMediaPlayerImpl::DataSourceInitialized(bool success) { |
| 1633 DVLOG(1) << __func__; | 1628 DVLOG(1) << __func__; |
| 1634 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 1629 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 1635 | 1630 |
| 1636 #if defined(OS_ANDROID) | 1631 #if defined(OS_ANDROID) |
| 1637 // We can't play HLS URLs with WebMediaPlayerImpl, so in cases where they are | 1632 // We can't play HLS URLs with WebMediaPlayerImpl, so in cases where they are |
| 1638 // encountered, instruct the HTML media element to create a new WebMediaPlayer | 1633 // encountered, instruct the HTML media element to create a new WebMediaPlayer |
| 1639 // instance with the correct URL to trigger the creation of WMPI with a | 1634 // instance with the correct URL to trigger the creation of WMPI with a |
| 1640 // MediaPlayerRendererFactory instead. | 1635 // MediaPlayerRendererFactory instead. |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2388 | 2383 |
| 2389 if (is_encrypted_) | 2384 if (is_encrypted_) |
| 2390 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.EME", height); | 2385 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.EME", height); |
| 2391 | 2386 |
| 2392 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.All", height); | 2387 UMA_HISTOGRAM_VIDEO_HEIGHT("Media.VideoHeight.Initial.All", height); |
| 2393 } | 2388 } |
| 2394 | 2389 |
| 2395 #undef UMA_HISTOGRAM_VIDEO_HEIGHT | 2390 #undef UMA_HISTOGRAM_VIDEO_HEIGHT |
| 2396 | 2391 |
| 2397 } // namespace media | 2392 } // namespace media |
| OLD | NEW |