| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 player_manager_->DestroyPlayer(player_id_); | 165 player_manager_->DestroyPlayer(player_id_); |
| 166 | 166 |
| 167 player_manager_->UnregisterMediaPlayer(player_id_); | 167 player_manager_->UnregisterMediaPlayer(player_id_); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 void WebMediaPlayerCast::Initialize(const GURL& url, | 171 void WebMediaPlayerCast::Initialize(const GURL& url, |
| 172 blink::WebLocalFrame* frame, | 172 blink::WebLocalFrame* frame, |
| 173 int delegate_id) { | 173 int delegate_id) { |
| 174 player_manager_->Initialize(MEDIA_PLAYER_TYPE_REMOTE_ONLY, player_id_, url, | 174 player_manager_->Initialize(MEDIA_PLAYER_TYPE_REMOTE_ONLY, player_id_, url, |
| 175 frame->document().firstPartyForCookies(), 0, | 175 frame->document().firstPartyForCookies(), |
| 176 frame->document().url(), true, delegate_id); | 176 frame->document().url(), true, delegate_id); |
| 177 is_player_initialized_ = true; | 177 is_player_initialized_ = true; |
| 178 } | 178 } |
| 179 | 179 |
| 180 void WebMediaPlayerCast::SetMediaPlayerManager( | 180 void WebMediaPlayerCast::SetMediaPlayerManager( |
| 181 RendererMediaPlayerManagerInterface* media_player_manager) { | 181 RendererMediaPlayerManagerInterface* media_player_manager) { |
| 182 player_manager_ = media_player_manager; | 182 player_manager_ = media_player_manager; |
| 183 player_id_ = player_manager_->RegisterMediaPlayer(this); | 183 player_id_ = player_manager_->RegisterMediaPlayer(this); |
| 184 } | 184 } |
| 185 | 185 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 void WebMediaPlayerCast::OnRemoteRouteAvailabilityChanged( | 326 void WebMediaPlayerCast::OnRemoteRouteAvailabilityChanged( |
| 327 bool routes_available) { | 327 bool routes_available) { |
| 328 DVLOG(1) << __FUNCTION__; | 328 DVLOG(1) << __FUNCTION__; |
| 329 client_->remoteRouteAvailabilityChanged(routes_available); | 329 client_->remoteRouteAvailabilityChanged(routes_available); |
| 330 } | 330 } |
| 331 | 331 |
| 332 void WebMediaPlayerCast::SuspendAndReleaseResources() {} | 332 void WebMediaPlayerCast::SuspendAndReleaseResources() {} |
| 333 void WebMediaPlayerCast::OnWaitingForDecryptionKey() {} | |
| 334 | 333 |
| 335 bool WebMediaPlayerCast::hasVideo() const { | 334 bool WebMediaPlayerCast::hasVideo() const { |
| 336 return true; | 335 return true; |
| 337 } | 336 } |
| 338 | 337 |
| 339 bool WebMediaPlayerCast::paused() const { | 338 bool WebMediaPlayerCast::paused() const { |
| 340 return paused_; | 339 return paused_; |
| 341 } | 340 } |
| 342 | 341 |
| 343 void WebMediaPlayerCast::SetDeviceScaleFactor(float scale_factor) { | 342 void WebMediaPlayerCast::SetDeviceScaleFactor(float scale_factor) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 366 return MakeTextFrameForCast(remote_playback_message_, canvas_size, | 365 return MakeTextFrameForCast(remote_playback_message_, canvas_size, |
| 367 webmediaplayer_->naturalSize(), | 366 webmediaplayer_->naturalSize(), |
| 368 base::Bind(&GLCBShim, context_3d_cb_)); | 367 base::Bind(&GLCBShim, context_3d_cb_)); |
| 369 } | 368 } |
| 370 | 369 |
| 371 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { | 370 void WebMediaPlayerCast::setPoster(const blink::WebURL& poster) { |
| 372 player_manager_->SetPoster(player_id_, poster); | 371 player_manager_->SetPoster(player_id_, poster); |
| 373 } | 372 } |
| 374 | 373 |
| 375 } // namespace media | 374 } // namespace media |
| OLD | NEW |