| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 325 |
| 326 void WebMediaPlayerCast::OnMediaPlayerPause() { | 326 void WebMediaPlayerCast::OnMediaPlayerPause() { |
| 327 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_; | 327 DVLOG(1) << __FUNCTION__ << " is_remote_ = " << is_remote_; |
| 328 if (is_remote_ && !paused_) { | 328 if (is_remote_ && !paused_) { |
| 329 paused_ = true; | 329 paused_ = true; |
| 330 client_->playbackStateChanged(); | 330 client_->playbackStateChanged(); |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 | 333 |
| 334 void WebMediaPlayerCast::OnRemoteRouteAvailabilityChanged( | 334 void WebMediaPlayerCast::OnRemoteRouteAvailabilityChanged( |
| 335 bool routes_available) { | 335 bool is_route_available, |
| 336 bool is_source_compatible) { |
| 336 DVLOG(1) << __FUNCTION__; | 337 DVLOG(1) << __FUNCTION__; |
| 337 client_->remoteRouteAvailabilityChanged(routes_available); | 338 client_->remoteRouteAvailabilityChanged(is_route_available, |
| 339 is_source_compatible); |
| 338 } | 340 } |
| 339 | 341 |
| 340 void WebMediaPlayerCast::SuspendAndReleaseResources() {} | 342 void WebMediaPlayerCast::SuspendAndReleaseResources() {} |
| 341 | 343 |
| 342 bool WebMediaPlayerCast::hasVideo() const { | 344 bool WebMediaPlayerCast::hasVideo() const { |
| 343 return true; | 345 return true; |
| 344 } | 346 } |
| 345 | 347 |
| 346 bool WebMediaPlayerCast::paused() const { | 348 bool WebMediaPlayerCast::paused() const { |
| 347 return paused_; | 349 return paused_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 373 return MakeTextFrameForCast(remote_playback_message_, canvas_size, | 375 return MakeTextFrameForCast(remote_playback_message_, canvas_size, |
| 374 webmediaplayer_->naturalSize(), | 376 webmediaplayer_->naturalSize(), |
| 375 base::Bind(&GLCBShim, context_3d_cb_)); | 377 base::Bind(&GLCBShim, context_3d_cb_)); |
| 376 } | 378 } |
| 377 | 379 |
| 378 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { | 380 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { |
| 379 player_manager_->SetPoster(player_id_, poster); | 381 player_manager_->SetPoster(player_id_, poster); |
| 380 } | 382 } |
| 381 | 383 |
| 382 } // namespace media | 384 } // namespace media |
| OLD | NEW |