| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void ReallocateVideoFrame(); | 278 void ReallocateVideoFrame(); |
| 279 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); | 279 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); |
| 280 void RemoveSurfaceTextureAndProxy(); | 280 void RemoveSurfaceTextureAndProxy(); |
| 281 void DidLoadMediaInfo(MediaInfoLoader::Status status, | 281 void DidLoadMediaInfo(MediaInfoLoader::Status status, |
| 282 const GURL& redirected_url, | 282 const GURL& redirected_url, |
| 283 const GURL& first_party_for_cookies, | 283 const GURL& first_party_for_cookies, |
| 284 bool allow_stored_credentials); | 284 bool allow_stored_credentials); |
| 285 bool IsKeySystemSupported(const std::string& key_system); | 285 bool IsKeySystemSupported(const std::string& key_system); |
| 286 bool IsLocalResource(); | 286 bool IsLocalResource(); |
| 287 | 287 |
| 288 // Called whenever we create a new StreamTextureProxy and had a VFP::Client, |
| 289 // or when we get a new VFP::Client and had a StreamTextureProxy. |
| 290 // Sets |stream_texture_proxy_|'s OnFrameAvailable() to call |client|'s |
| 291 // DidReceiveFrame(). |
| 292 // Passing nullptr to this method will clear the previous callback. |
| 293 void UpdateStreamTextureProxyCallback(cc::VideoFrameProvider::Client* client); |
| 294 |
| 288 // Called when |cdm_context| is ready. | 295 // Called when |cdm_context| is ready. |
| 289 void OnCdmContextReady(media::CdmContext* cdm_context); | 296 void OnCdmContextReady(media::CdmContext* cdm_context); |
| 290 | 297 |
| 291 // Sets the CDM. Should only be called when |is_player_initialized_| is true | 298 // Sets the CDM. Should only be called when |is_player_initialized_| is true |
| 292 // and a new non-null |cdm_context_| is available. Fires |cdm_attached_cb_| on | 299 // and a new non-null |cdm_context_| is available. Fires |cdm_attached_cb_| on |
| 293 // the main thread with the result after the CDM is attached. | 300 // the main thread with the result after the CDM is attached. |
| 294 void SetCdmInternal(const media::CdmAttachedCB& cdm_attached_cb); | 301 void SetCdmInternal(const media::CdmAttachedCB& cdm_attached_cb); |
| 295 | 302 |
| 296 // Called when the CDM is attached. | 303 // Called when the CDM is attached. |
| 297 void OnCdmAttached(const media::CdmAttachedCB& cdm_attached_cb, bool success); | 304 void OnCdmAttached(const media::CdmAttachedCB& cdm_attached_cb, bool success); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 522 |
| 516 // NOTE: Weak pointers must be invalidated before all other member variables. | 523 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 517 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 524 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 518 | 525 |
| 519 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 526 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 520 }; | 527 }; |
| 521 | 528 |
| 522 } // namespace content | 529 } // namespace content |
| 523 | 530 |
| 524 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 531 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |