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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 unsigned init_data_length); | 311 unsigned init_data_length); |
312 MediaKeyException AddKeyInternal(const std::string& key_system, | 312 MediaKeyException AddKeyInternal(const std::string& key_system, |
313 const unsigned char* key, | 313 const unsigned char* key, |
314 unsigned key_length, | 314 unsigned key_length, |
315 const unsigned char* init_data, | 315 const unsigned char* init_data, |
316 unsigned init_data_length, | 316 unsigned init_data_length, |
317 const std::string& session_id); | 317 const std::string& session_id); |
318 MediaKeyException CancelKeyRequestInternal(const std::string& key_system, | 318 MediaKeyException CancelKeyRequestInternal(const std::string& key_system, |
319 const std::string& session_id); | 319 const std::string& session_id); |
320 | 320 |
| 321 // Called when |cdm_context| is ready. |
| 322 void OnCdmContextReady(media::CdmContext* cdm_context); |
| 323 |
321 // Sets the CDM. Should only be called when |is_player_initialized_| is true | 324 // Sets the CDM. Should only be called when |is_player_initialized_| is true |
322 // and a new non-null |cdm_context_| is available. Fires |cdm_attached_cb_| | 325 // and a new non-null |cdm_context_| is available. Fires |cdm_attached_cb_| |
323 // with the result after the CDM is attached. | 326 // with the result after the CDM is attached. |
324 void SetCdmInternal(const media::CdmAttachedCB& cdm_attached_cb); | 327 void SetCdmInternal(const media::CdmAttachedCB& cdm_attached_cb); |
325 | 328 |
326 // Requests that this object notifies when a decryptor is ready through the | 329 // Requests that this object notifies when a decryptor is ready through the |
327 // |decryptor_ready_cb| provided. | 330 // |decryptor_ready_cb| provided. |
328 // If |decryptor_ready_cb| is null, the existing callback will be fired with | 331 // If |decryptor_ready_cb| is null, the existing callback will be fired with |
329 // NULL immediately and reset. | 332 // NULL immediately and reset. |
330 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); | 333 void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 520 |
518 // NOTE: Weak pointers must be invalidated before all other member variables. | 521 // NOTE: Weak pointers must be invalidated before all other member variables. |
519 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 522 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
520 | 523 |
521 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 524 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
522 }; | 525 }; |
523 | 526 |
524 } // namespace content | 527 } // namespace content |
525 | 528 |
526 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 529 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |