| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 t = webmediaplayer_->duration(); | 291 t = webmediaplayer_->duration(); |
| 292 } | 292 } |
| 293 webmediaplayer_->OnDisconnectedFromRemoteDevice(t); | 293 webmediaplayer_->OnDisconnectedFromRemoteDevice(t); |
| 294 } | 294 } |
| 295 | 295 |
| 296 void WebMediaPlayerCast::OnCancelledRemotePlaybackRequest() { | 296 void WebMediaPlayerCast::OnCancelledRemotePlaybackRequest() { |
| 297 DVLOG(1) << __FUNCTION__; | 297 DVLOG(1) << __FUNCTION__; |
| 298 client_->cancelledRemotePlaybackRequest(); | 298 client_->cancelledRemotePlaybackRequest(); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void WebMediaPlayerCast::OnRemotePlaybackStarted() { |
| 302 client_->remotePlaybackStarted(); |
| 303 } |
| 304 |
| 301 void WebMediaPlayerCast::OnDidExitFullscreen() { | 305 void WebMediaPlayerCast::OnDidExitFullscreen() { |
| 302 DVLOG(1) << __FUNCTION__; | 306 DVLOG(1) << __FUNCTION__; |
| 303 } | 307 } |
| 304 | 308 |
| 305 void WebMediaPlayerCast::OnMediaPlayerPlay() { | 309 void WebMediaPlayerCast::OnMediaPlayerPlay() { |
| 306 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_; | 310 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_; |
| 307 initializing_ = false; | 311 initializing_ = false; |
| 308 if (is_remote_ && paused_) { | 312 if (is_remote_ && paused_) { |
| 309 paused_ = false; | 313 paused_ = false; |
| 310 remote_time_at_ = base::TimeTicks::Now(); | 314 remote_time_at_ = base::TimeTicks::Now(); |
| (...skipping 54 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 |