Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1415683009: Support earliest seekable time in WMPI. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more androidfixes. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698