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 MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 void RemoveSession( | 46 void RemoveSession( |
47 const mojo::String& session_id, | 47 const mojo::String& session_id, |
48 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; | 48 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; |
49 void GetCdmContext(int32_t cdm_id, | 49 void GetCdmContext(int32_t cdm_id, |
50 mojo::InterfaceRequest<mojo::Decryptor> decryptor) final; | 50 mojo::InterfaceRequest<mojo::Decryptor> decryptor) final; |
51 | 51 |
52 private: | 52 private: |
53 // Callbacks for firing session events. | 53 // Callbacks for firing session events. |
54 void OnSessionMessage(const std::string& session_id, | 54 void OnSessionMessage(const std::string& session_id, |
55 MediaKeys::MessageType message_type, | 55 MediaKeys::MessageType message_type, |
56 const std::vector<uint8_t>& message); | 56 const std::vector<uint8_t>& message, |
| 57 const GURL& legacy_destination_url); |
57 void OnSessionKeysChange(const std::string& session_id, | 58 void OnSessionKeysChange(const std::string& session_id, |
58 bool has_additional_usable_key, | 59 bool has_additional_usable_key, |
59 CdmKeysInfo keys_info); | 60 CdmKeysInfo keys_info); |
60 void OnSessionExpirationUpdate(const std::string& session_id, | 61 void OnSessionExpirationUpdate(const std::string& session_id, |
61 const base::Time& new_expiry_time); | 62 const base::Time& new_expiry_time); |
62 void OnSessionClosed(const std::string& session_id); | 63 void OnSessionClosed(const std::string& session_id); |
63 void OnSessionError(const std::string& session_id, | 64 void OnSessionError(const std::string& session_id, |
64 MediaKeys::Exception exception, | 65 MediaKeys::Exception exception, |
65 uint32_t system_code, | 66 uint32_t system_code, |
66 const std::string& error_message); | 67 const std::string& error_message); |
67 | 68 |
68 scoped_ptr<MediaKeys> cdm_; | 69 scoped_ptr<MediaKeys> cdm_; |
69 | 70 |
70 base::WeakPtrFactory<MojoCdmService> weak_factory_; | 71 base::WeakPtrFactory<MojoCdmService> weak_factory_; |
71 base::WeakPtr<MojoCdmService> weak_this_; | 72 base::WeakPtr<MojoCdmService> weak_this_; |
72 | 73 |
73 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); | 74 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); |
74 }; | 75 }; |
75 | 76 |
76 } // namespace media | 77 } // namespace media |
77 | 78 |
78 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ | 79 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ |
OLD | NEW |