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

Side by Side Diff: webkit/media/android/webmediaplayer_android.cc

Issue 15499006: Enable seek in fullscreen mode for MSE impl on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 7 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/media/android/webmediaplayer_android.h" 5 #include "webkit/media/android/webmediaplayer_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 if (proxy_) 151 if (proxy_)
152 proxy_->Pause(player_id_); 152 proxy_->Pause(player_id_);
153 is_playing_ = false; 153 is_playing_ = false;
154 } 154 }
155 155
156 void WebMediaPlayerAndroid::seek(double seconds) { 156 void WebMediaPlayerAndroid::seek(double seconds) {
157 pending_seek_ = seconds; 157 pending_seek_ = seconds;
158 seeking_ = true; 158 seeking_ = true;
159 159
160 base::TimeDelta seek_time = ConvertSecondsToTimestamp(seconds); 160 base::TimeDelta seek_time = ConvertSecondsToTimestamp(seconds);
161 #if defined(GOOGLE_TV)
161 if (media_source_delegate_) 162 if (media_source_delegate_)
162 media_source_delegate_->Seek(seek_time); 163 media_source_delegate_->Seek(seek_time);
acolwell GONE FROM CHROMIUM 2013/05/21 17:49:42 If this is left in for GOOGLE_TV would this cause
qinmin 2013/05/21 23:04:56 GTV is not using media_source_player, so seek() wi
164 #endif
163 if (proxy_) 165 if (proxy_)
164 proxy_->Seek(player_id_, seek_time); 166 proxy_->Seek(player_id_, seek_time);
165 } 167 }
166 168
167 bool WebMediaPlayerAndroid::supportsFullscreen() const { 169 bool WebMediaPlayerAndroid::supportsFullscreen() const {
168 return true; 170 return true;
169 } 171 }
170 172
171 bool WebMediaPlayerAndroid::supportsSave() const { 173 bool WebMediaPlayerAndroid::supportsSave() const {
172 return false; 174 return false;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 void WebMediaPlayerAndroid::OnMediaPlayerPlay() { 494 void WebMediaPlayerAndroid::OnMediaPlayerPlay() {
493 UpdatePlayingState(true); 495 UpdatePlayingState(true);
494 client_->playbackStateChanged(); 496 client_->playbackStateChanged();
495 } 497 }
496 498
497 void WebMediaPlayerAndroid::OnMediaPlayerPause() { 499 void WebMediaPlayerAndroid::OnMediaPlayerPause() {
498 UpdatePlayingState(false); 500 UpdatePlayingState(false);
499 client_->playbackStateChanged(); 501 client_->playbackStateChanged();
500 } 502 }
501 503
504 void WebMediaPlayerAndroid::OnMediaSeekRequest(base::TimeDelta time_to_seek) {
505 if (media_source_delegate_) {
506 media_source_delegate_->Seek(time_to_seek);
507 OnTimeUpdate(time_to_seek);
508 }
509 }
510
502 void WebMediaPlayerAndroid::UpdateNetworkState( 511 void WebMediaPlayerAndroid::UpdateNetworkState(
503 WebMediaPlayer::NetworkState state) { 512 WebMediaPlayer::NetworkState state) {
504 network_state_ = state; 513 network_state_ = state;
505 client_->networkStateChanged(); 514 client_->networkStateChanged();
506 } 515 }
507 516
508 void WebMediaPlayerAndroid::UpdateReadyState( 517 void WebMediaPlayerAndroid::UpdateReadyState(
509 WebMediaPlayer::ReadyState state) { 518 WebMediaPlayer::ReadyState state) {
510 ready_state_ = state; 519 ready_state_ = state;
511 client_->readyStateChanged(); 520 client_->readyStateChanged();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 void WebMediaPlayerAndroid::exitFullscreen() { 699 void WebMediaPlayerAndroid::exitFullscreen() {
691 if (proxy_) 700 if (proxy_)
692 proxy_->ExitFullscreen(player_id_); 701 proxy_->ExitFullscreen(player_id_);
693 } 702 }
694 703
695 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 704 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
696 return manager_->CanEnterFullscreen(frame_); 705 return manager_->CanEnterFullscreen(frame_);
697 } 706 }
698 707
699 } // namespace webkit_media 708 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698