| 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 "content/renderer/media/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 } | 530 } |
| 531 | 531 |
| 532 bool WebMediaPlayerAndroid::paused() const { | 532 bool WebMediaPlayerAndroid::paused() const { |
| 533 return !is_playing_; | 533 return !is_playing_; |
| 534 } | 534 } |
| 535 | 535 |
| 536 bool WebMediaPlayerAndroid::seeking() const { | 536 bool WebMediaPlayerAndroid::seeking() const { |
| 537 return seeking_; | 537 return seeking_; |
| 538 } | 538 } |
| 539 | 539 |
| 540 double WebMediaPlayerAndroid::earliestTime() const { |
| 541 return 0; |
| 542 } |
| 543 |
| 540 double WebMediaPlayerAndroid::duration() const { | 544 double WebMediaPlayerAndroid::duration() const { |
| 541 DCHECK(main_thread_checker_.CalledOnValidThread()); | 545 DCHECK(main_thread_checker_.CalledOnValidThread()); |
| 542 if (duration_ == media::kInfiniteDuration()) | 546 if (duration_ == media::kInfiniteDuration()) |
| 543 return std::numeric_limits<double>::infinity(); | 547 return std::numeric_limits<double>::infinity(); |
| 544 | 548 |
| 545 return duration_.InSecondsF(); | 549 return duration_.InSecondsF(); |
| 546 } | 550 } |
| 547 | 551 |
| 548 double WebMediaPlayerAndroid::timelineOffset() const { | 552 double WebMediaPlayerAndroid::timelineOffset() const { |
| 549 DCHECK(main_thread_checker_.CalledOnValidThread()); | 553 DCHECK(main_thread_checker_.CalledOnValidThread()); |
| (...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1919 | 1923 |
| 1920 bool is_hls = IsHLSStream(); | 1924 bool is_hls = IsHLSStream(); |
| 1921 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); | 1925 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); |
| 1922 if (is_hls) { | 1926 if (is_hls) { |
| 1923 media::RecordOriginOfHLSPlayback( | 1927 media::RecordOriginOfHLSPlayback( |
| 1924 GURL(frame_->document().securityOrigin().toString())); | 1928 GURL(frame_->document().securityOrigin().toString())); |
| 1925 } | 1929 } |
| 1926 } | 1930 } |
| 1927 | 1931 |
| 1928 } // namespace content | 1932 } // namespace content |
| OLD | NEW |