| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ | 5 #ifndef CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ |
| 6 #define CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ | 6 #define CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 const base::Closure& cdm_unset_cb) override; | 45 const base::Closure& cdm_unset_cb) override; |
| 46 void UnregisterPlayer(int registration_id) override; | 46 void UnregisterPlayer(int registration_id) override; |
| 47 | 47 |
| 48 // Returns the decryption context needed to decrypt frames encrypted with | 48 // Returns the decryption context needed to decrypt frames encrypted with |
| 49 // |key_id|. | 49 // |key_id|. |
| 50 // Returns null if |key_id| is not available. | 50 // Returns null if |key_id| is not available. |
| 51 virtual scoped_refptr<DecryptContext> GetDecryptContext( | 51 virtual scoped_refptr<DecryptContext> GetDecryptContext( |
| 52 const std::string& key_id) const = 0; | 52 const std::string& key_id) const = 0; |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 void OnSessionMessage(const std::string& web_session_id, | 55 void OnSessionMessage(const std::string& session_id, |
| 56 const std::vector<uint8>& message, | 56 const std::vector<uint8>& message, |
| 57 const GURL& destination_url); | 57 const GURL& destination_url); |
| 58 void OnSessionClosed(const std::string& web_session_id); | 58 void OnSessionClosed(const std::string& session_id); |
| 59 void OnSessionKeysChange(const std::string& web_session_id, | 59 void OnSessionKeysChange(const std::string& session_id, |
| 60 const ::media::KeyIdAndKeyPairs& keys); | 60 const ::media::KeyIdAndKeyPairs& keys); |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 ::media::SessionMessageCB session_message_cb_; | 63 ::media::SessionMessageCB session_message_cb_; |
| 64 ::media::SessionClosedCB session_closed_cb_; | 64 ::media::SessionClosedCB session_closed_cb_; |
| 65 ::media::SessionErrorCB session_error_cb_; | 65 ::media::SessionErrorCB session_error_cb_; |
| 66 ::media::SessionKeysChangeCB session_keys_change_cb_; | 66 ::media::SessionKeysChangeCB session_keys_change_cb_; |
| 67 ::media::SessionExpirationUpdateCB session_expiration_update_cb_; | 67 ::media::SessionExpirationUpdateCB session_expiration_update_cb_; |
| 68 | 68 |
| 69 ::media::PlayerTrackerImpl player_tracker_; | 69 ::media::PlayerTrackerImpl player_tracker_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(BrowserCdmCast); | 71 DISALLOW_COPY_AND_ASSIGN(BrowserCdmCast); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace media | 74 } // namespace media |
| 75 } // namespace chromecast | 75 } // namespace chromecast |
| 76 | 76 |
| 77 #endif // CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ | 77 #endif // CHROMECAST_MEDIA_CDM_BROWSER_CDM_CAST_H_ |
| OLD | NEW |