| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_cast_android.h" | 5 #include "media/blink/webmediaplayer_cast_android.h" |
| 6 | 6 |
| 7 #include "gpu/GLES2/gl2extchromium.h" | 7 #include "gpu/GLES2/gl2extchromium.h" |
| 8 #include "gpu/command_buffer/client/gles2_interface.h" | 8 #include "gpu/command_buffer/client/gles2_interface.h" |
| 9 #include "gpu/command_buffer/common/sync_token.h" | 9 #include "gpu/command_buffer/common/sync_token.h" |
| 10 #include "media/base/android/media_common_android.h" | 10 #include "media/base/android/media_common_android.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 void WebMediaPlayerCast::requestRemotePlayback() { | 186 void WebMediaPlayerCast::requestRemotePlayback() { |
| 187 player_manager_->Seek(player_id_, base::TimeDelta::FromSecondsD( | 187 player_manager_->Seek(player_id_, base::TimeDelta::FromSecondsD( |
| 188 webmediaplayer_->currentTime())); | 188 webmediaplayer_->currentTime())); |
| 189 player_manager_->RequestRemotePlayback(player_id_); | 189 player_manager_->RequestRemotePlayback(player_id_); |
| 190 } | 190 } |
| 191 | 191 |
| 192 void WebMediaPlayerCast::requestRemotePlaybackControl() { | 192 void WebMediaPlayerCast::requestRemotePlaybackControl() { |
| 193 player_manager_->RequestRemotePlaybackControl(player_id_); | 193 player_manager_->RequestRemotePlaybackControl(player_id_); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void WebMediaPlayerCast::requestRemotePlaybackStop() { |
| 197 player_manager_->RequestRemotePlaybackStop(player_id_); |
| 198 } |
| 199 |
| 196 void WebMediaPlayerCast::OnMediaMetadataChanged(base::TimeDelta duration, | 200 void WebMediaPlayerCast::OnMediaMetadataChanged(base::TimeDelta duration, |
| 197 int width, | 201 int width, |
| 198 int height, | 202 int height, |
| 199 bool success) { | 203 bool success) { |
| 200 duration_ = duration; | 204 duration_ = duration; |
| 201 } | 205 } |
| 202 | 206 |
| 203 void WebMediaPlayerCast::OnPlaybackComplete() { | 207 void WebMediaPlayerCast::OnPlaybackComplete() { |
| 204 DVLOG(1) << __FUNCTION__; | 208 DVLOG(1) << __FUNCTION__; |
| 205 webmediaplayer_->OnRemotePlaybackEnded(); | 209 webmediaplayer_->OnRemotePlaybackEnded(); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 return MakeTextFrameForCast(remote_playback_message_, canvas_size, | 369 return MakeTextFrameForCast(remote_playback_message_, canvas_size, |
| 366 webmediaplayer_->naturalSize(), | 370 webmediaplayer_->naturalSize(), |
| 367 base::Bind(&GLCBShim, context_3d_cb_)); | 371 base::Bind(&GLCBShim, context_3d_cb_)); |
| 368 } | 372 } |
| 369 | 373 |
| 370 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { | 374 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { |
| 371 player_manager_->SetPoster(player_id_, poster); | 375 player_manager_->SetPoster(player_id_, poster); |
| 372 } | 376 } |
| 373 | 377 |
| 374 } // namespace media | 378 } // namespace media |
| OLD | NEW |