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 <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 void DoCreateStreamTexture(); | 249 void DoCreateStreamTexture(); |
250 | 250 |
251 // Helper method to reestablish the surface texture peer for android | 251 // Helper method to reestablish the surface texture peer for android |
252 // media player. | 252 // media player. |
253 void EstablishSurfaceTexturePeer(); | 253 void EstablishSurfaceTexturePeer(); |
254 | 254 |
255 // Requesting whether the surface texture peer needs to be reestablished. | 255 // Requesting whether the surface texture peer needs to be reestablished. |
256 void SetNeedsEstablishPeer(bool needs_establish_peer); | 256 void SetNeedsEstablishPeer(bool needs_establish_peer); |
257 | 257 |
258 private: | 258 private: |
259 void InitializePlayer(int demuxer_client_id); | 259 void InitializePlayer(const GURL& url, |
| 260 const GURL& first_party_for_cookies, |
| 261 bool allowed_stored_credentials, |
| 262 int demuxer_client_id); |
260 void Pause(bool is_media_related_action); | 263 void Pause(bool is_media_related_action); |
261 void DrawRemotePlaybackText(const std::string& remote_playback_message); | 264 void DrawRemotePlaybackText(const std::string& remote_playback_message); |
262 void ReallocateVideoFrame(); | 265 void ReallocateVideoFrame(); |
263 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); | 266 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); |
264 void DidLoadMediaInfo(MediaInfoLoader::Status status); | 267 void DidLoadMediaInfo(MediaInfoLoader::Status status, |
| 268 const GURL& redirected_url, |
| 269 const GURL& first_party_for_cookies, |
| 270 bool allow_stored_credentials); |
265 bool IsKeySystemSupported(const std::string& key_system); | 271 bool IsKeySystemSupported(const std::string& key_system); |
266 | 272 |
267 // Actually do the work for generateKeyRequest/addKey so they can easily | 273 // Actually do the work for generateKeyRequest/addKey so they can easily |
268 // report results to UMA. | 274 // report results to UMA. |
269 MediaKeyException GenerateKeyRequestInternal(const std::string& key_system, | 275 MediaKeyException GenerateKeyRequestInternal(const std::string& key_system, |
270 const unsigned char* init_data, | 276 const unsigned char* init_data, |
271 unsigned init_data_length); | 277 unsigned init_data_length); |
272 MediaKeyException AddKeyInternal(const std::string& key_system, | 278 MediaKeyException AddKeyInternal(const std::string& key_system, |
273 const unsigned char* key, | 279 const unsigned char* key, |
274 unsigned key_length, | 280 unsigned key_length, |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 WebContentDecryptionModuleImpl* web_cdm_; | 449 WebContentDecryptionModuleImpl* web_cdm_; |
444 | 450 |
445 // This is only Used by Clear Key key system implementation, where a renderer | 451 // This is only Used by Clear Key key system implementation, where a renderer |
446 // side CDM will be used. This is similar to WebMediaPlayerImpl. For other key | 452 // side CDM will be used. This is similar to WebMediaPlayerImpl. For other key |
447 // systems, a browser side CDM will be used and we set CDM by calling | 453 // systems, a browser side CDM will be used and we set CDM by calling |
448 // player_manager_->SetCdm() directly. | 454 // player_manager_->SetCdm() directly. |
449 media::DecryptorReadyCB decryptor_ready_cb_; | 455 media::DecryptorReadyCB decryptor_ready_cb_; |
450 | 456 |
451 SkBitmap bitmap_; | 457 SkBitmap bitmap_; |
452 | 458 |
| 459 // Whether stored credentials are allowed to be passed to the server. |
| 460 bool allow_stored_credentials_; |
| 461 |
453 // NOTE: Weak pointers must be invalidated before all other member variables. | 462 // NOTE: Weak pointers must be invalidated before all other member variables. |
454 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 463 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
455 | 464 |
456 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 465 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
457 }; | 466 }; |
458 | 467 |
459 } // namespace content | 468 } // namespace content |
460 | 469 |
461 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 470 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |