OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_REMOTING_REMOTING_CDM_H_ | 5 #ifndef MEDIA_REMOTING_REMOTING_CDM_H_ |
6 #define MEDIA_REMOTING_REMOTING_CDM_H_ | 6 #define MEDIA_REMOTING_REMOTING_CDM_H_ |
7 | 7 |
8 #include "media/base/cdm_factory.h" | 8 #include "media/base/cdm_factory.h" |
9 #include "media/base/content_decryption_module.h" | 9 #include "media/base/content_decryption_module.h" |
10 #include "media/remoting/remoting_cdm_context.h" | 10 #include "media/remoting/remoting_cdm_context.h" |
11 #include "media/remoting/remoting_cdm_controller.h" | 11 #include "media/remoting/remoting_cdm_controller.h" |
12 | 12 |
13 namespace media { | 13 namespace media { |
| 14 namespace remoting { |
14 | 15 |
15 // TODO(xjz): Merge this with erickung's implementation. | 16 // TODO(xjz): Merge this with erickung's implementation. |
| 17 // TODO(miu): Execute renaming on all RemotingCdm* classes after erickung's |
| 18 // implementation is merged-in. |
16 class RemotingCdm : public ContentDecryptionModule { | 19 class RemotingCdm : public ContentDecryptionModule { |
17 public: | 20 public: |
18 RemotingCdm(const std::string& key_system, | 21 RemotingCdm(const std::string& key_system, |
19 const GURL& security_origin, | 22 const GURL& security_origin, |
20 const CdmConfig& cdm_config, | 23 const CdmConfig& cdm_config, |
21 const SessionMessageCB& session_message_cb, | 24 const SessionMessageCB& session_message_cb, |
22 const SessionClosedCB& session_closed_cb, | 25 const SessionClosedCB& session_closed_cb, |
23 const SessionKeysChangeCB& session_keys_change_cb, | 26 const SessionKeysChangeCB& session_keys_change_cb, |
24 const SessionExpirationUpdateCB& session_expiration_update_cb, | 27 const SessionExpirationUpdateCB& session_expiration_update_cb, |
25 const CdmCreatedCB& cdm_created_cb, | 28 const CdmCreatedCB& cdm_created_cb, |
(...skipping 12 matching lines...) Expand all Loading... |
38 std::unique_ptr<NewSessionCdmPromise> promise) override; | 41 std::unique_ptr<NewSessionCdmPromise> promise) override; |
39 void UpdateSession(const std::string& session_id, | 42 void UpdateSession(const std::string& session_id, |
40 const std::vector<uint8_t>& response, | 43 const std::vector<uint8_t>& response, |
41 std::unique_ptr<SimpleCdmPromise> promise) override; | 44 std::unique_ptr<SimpleCdmPromise> promise) override; |
42 void CloseSession(const std::string& session_id, | 45 void CloseSession(const std::string& session_id, |
43 std::unique_ptr<SimpleCdmPromise> promise) override; | 46 std::unique_ptr<SimpleCdmPromise> promise) override; |
44 void RemoveSession(const std::string& session_id, | 47 void RemoveSession(const std::string& session_id, |
45 std::unique_ptr<SimpleCdmPromise> promise) override; | 48 std::unique_ptr<SimpleCdmPromise> promise) override; |
46 CdmContext* GetCdmContext() override; | 49 CdmContext* GetCdmContext() override; |
47 | 50 |
48 RemotingSourceImpl* GetRemotingSource(); | 51 SharedSession* session() const { return remoting_cdm_controller_->session(); } |
49 | 52 |
50 private: | 53 private: |
51 ~RemotingCdm() override; | 54 ~RemotingCdm() override; |
52 | 55 |
53 const std::unique_ptr<RemotingCdmController> remoting_cdm_controller_; | 56 const std::unique_ptr<RemotingCdmController> remoting_cdm_controller_; |
54 RemotingCdmContext remoting_cdm_context_; | 57 RemotingCdmContext remoting_cdm_context_; |
55 | 58 |
56 DISALLOW_COPY_AND_ASSIGN(RemotingCdm); | 59 DISALLOW_COPY_AND_ASSIGN(RemotingCdm); |
57 }; | 60 }; |
58 | 61 |
| 62 } // namespace remoting |
59 } // namespace media | 63 } // namespace media |
60 | 64 |
61 #endif // MEDIA_REMOTING_REMOTING_CDM_H_ | 65 #endif // MEDIA_REMOTING_REMOTING_CDM_H_ |
OLD | NEW |