| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 t = webmediaplayer_->duration(); | 295 t = webmediaplayer_->duration(); |
| 296 } | 296 } |
| 297 webmediaplayer_->OnDisconnectedFromRemoteDevice(t); | 297 webmediaplayer_->OnDisconnectedFromRemoteDevice(t); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void WebMediaPlayerCast::OnCancelledRemotePlaybackRequest() { | 300 void WebMediaPlayerCast::OnCancelledRemotePlaybackRequest() { |
| 301 DVLOG(1) << __FUNCTION__; | 301 DVLOG(1) << __FUNCTION__; |
| 302 client_->cancelledRemotePlaybackRequest(); | 302 client_->cancelledRemotePlaybackRequest(); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void WebMediaPlayerCast::OnRemotePlaybackStarted() { |
| 306 client_->remotePlaybackStarted(); |
| 307 } |
| 308 |
| 305 void WebMediaPlayerCast::OnDidExitFullscreen() { | 309 void WebMediaPlayerCast::OnDidExitFullscreen() { |
| 306 DVLOG(1) << __FUNCTION__; | 310 DVLOG(1) << __FUNCTION__; |
| 307 } | 311 } |
| 308 | 312 |
| 309 void WebMediaPlayerCast::OnMediaPlayerPlay() { | 313 void WebMediaPlayerCast::OnMediaPlayerPlay() { |
| 310 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_; | 314 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_; |
| 311 initializing_ = false; | 315 initializing_ = false; |
| 312 if (is_remote_ && paused_) { | 316 if (is_remote_ && paused_) { |
| 313 paused_ = false; | 317 paused_ = false; |
| 314 remote_time_at_ = base::TimeTicks::Now(); | 318 remote_time_at_ = base::TimeTicks::Now(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 return MakeTextFrameForCast(remote_playback_message_, canvas_size, | 373 return MakeTextFrameForCast(remote_playback_message_, canvas_size, |
| 370 webmediaplayer_->naturalSize(), | 374 webmediaplayer_->naturalSize(), |
| 371 base::Bind(&GLCBShim, context_3d_cb_)); | 375 base::Bind(&GLCBShim, context_3d_cb_)); |
| 372 } | 376 } |
| 373 | 377 |
| 374 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { | 378 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { |
| 375 player_manager_->SetPoster(player_id_, poster); | 379 player_manager_->SetPoster(player_id_, poster); |
| 376 } | 380 } |
| 377 | 381 |
| 378 } // namespace media | 382 } // namespace media |
| OLD | NEW |