Chromium Code Reviews| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 242 void DoCreateStreamTexture(); | 242 void DoCreateStreamTexture(); |
| 243 | 243 |
| 244 // Helper method to reestablish the surface texture peer for android | 244 // Helper method to reestablish the surface texture peer for android |
| 245 // media player. | 245 // media player. |
| 246 void EstablishSurfaceTexturePeer(); | 246 void EstablishSurfaceTexturePeer(); |
| 247 | 247 |
| 248 // Requesting whether the surface texture peer needs to be reestablished. | 248 // Requesting whether the surface texture peer needs to be reestablished. |
| 249 void SetNeedsEstablishPeer(bool needs_establish_peer); | 249 void SetNeedsEstablishPeer(bool needs_establish_peer); |
| 250 | 250 |
| 251 private: | 251 private: |
| 252 void InitializePlayer(int demuxer_client_id); | 252 void InitializePlayer(const GURL& url, |
| 253 const GURL& first_party_for_cookies, | |
| 254 bool allowed_stored_credentials, | |
| 255 int demuxer_client_id); | |
| 253 void Pause(bool is_media_related_action); | 256 void Pause(bool is_media_related_action); |
| 254 void DrawRemotePlaybackText(const std::string& remote_playback_message); | 257 void DrawRemotePlaybackText(const std::string& remote_playback_message); |
| 255 void ReallocateVideoFrame(); | 258 void ReallocateVideoFrame(); |
| 256 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); | 259 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); |
| 257 void DidLoadMediaInfo(MediaInfoLoader::Status status); | 260 void DidLoadMediaInfo(MediaInfoLoader::Status status, |
| 261 const GURL& redirected_url, | |
| 262 const GURL& fist_party_for_cookies, | |
|
palmer
2014/07/31 00:06:48
Make sure to fix this typo everywhere.
| |
| 263 bool allow_stored_credentials); | |
| 258 bool IsKeySystemSupported(const std::string& key_system); | 264 bool IsKeySystemSupported(const std::string& key_system); |
| 259 | 265 |
| 266 // Helper method to check whether the media URL has a single security origin. | |
| 267 // The returned value might be different from that of | |
| 268 // hasSingleSecurityOrigin() as the latter is affected by OS limitations. | |
| 269 bool HasSingleSecurityOriginInternal() const; | |
| 270 | |
| 260 // Actually do the work for generateKeyRequest/addKey so they can easily | 271 // Actually do the work for generateKeyRequest/addKey so they can easily |
| 261 // report results to UMA. | 272 // report results to UMA. |
| 262 MediaKeyException GenerateKeyRequestInternal(const std::string& key_system, | 273 MediaKeyException GenerateKeyRequestInternal(const std::string& key_system, |
| 263 const unsigned char* init_data, | 274 const unsigned char* init_data, |
| 264 unsigned init_data_length); | 275 unsigned init_data_length); |
| 265 MediaKeyException AddKeyInternal(const std::string& key_system, | 276 MediaKeyException AddKeyInternal(const std::string& key_system, |
| 266 const unsigned char* key, | 277 const unsigned char* key, |
| 267 unsigned key_length, | 278 unsigned key_length, |
| 268 const unsigned char* init_data, | 279 const unsigned char* init_data, |
| 269 unsigned init_data_length, | 280 unsigned init_data_length, |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 // Non-owned pointer to the CDM. Updated via calls to | 440 // Non-owned pointer to the CDM. Updated via calls to |
| 430 // setContentDecryptionModule(). | 441 // setContentDecryptionModule(). |
| 431 WebContentDecryptionModuleImpl* web_cdm_; | 442 WebContentDecryptionModuleImpl* web_cdm_; |
| 432 | 443 |
| 433 // This is only Used by Clear Key key system implementation, where a renderer | 444 // This is only Used by Clear Key key system implementation, where a renderer |
| 434 // side CDM will be used. This is similar to WebMediaPlayerImpl. For other key | 445 // side CDM will be used. This is similar to WebMediaPlayerImpl. For other key |
| 435 // systems, a browser side CDM will be used and we set CDM by calling | 446 // systems, a browser side CDM will be used and we set CDM by calling |
| 436 // player_manager_->SetCdm() directly. | 447 // player_manager_->SetCdm() directly. |
| 437 media::DecryptorReadyCB decryptor_ready_cb_; | 448 media::DecryptorReadyCB decryptor_ready_cb_; |
| 438 | 449 |
| 450 // Whether stored credentials are allowed to be passed to the server. | |
| 451 bool allow_stored_credentials_; | |
| 452 | |
| 439 // NOTE: Weak pointers must be invalidated before all other member variables. | 453 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 440 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 454 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 441 | 455 |
| 442 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 456 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 443 }; | 457 }; |
| 444 | 458 |
| 445 } // namespace content | 459 } // namespace content |
| 446 | 460 |
| 447 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 461 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |