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 #include "media/remoting/remoting_cdm_context.h" | 5 #include "media/remoting/remoting_cdm_context.h" |
6 | 6 |
7 #include "media/remoting/remoting_cdm.h" | 7 #include "media/remoting/remoting_cdm.h" |
8 #include "media/remoting/remoting_source_impl.h" | 8 #include "media/remoting/shared_session.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
| 11 namespace remoting { |
11 | 12 |
12 namespace { | 13 namespace { |
13 // Used as an identifier for RemotingCdmContext::From(). | 14 // Used as an identifier for RemotingCdmContext::From(). |
14 void* const kClassIdentifier = const_cast<void**>(&kClassIdentifier); | 15 void* const kClassIdentifier = const_cast<void**>(&kClassIdentifier); |
15 } // namespace | 16 } // namespace |
16 | 17 |
17 // TODO(xjz): Merge this with erickung's implementation. | 18 // TODO(xjz): Merge this with erickung's implementation. |
18 RemotingCdmContext::RemotingCdmContext(RemotingCdm* remoting_cdm) | 19 RemotingCdmContext::RemotingCdmContext(RemotingCdm* remoting_cdm) |
19 : remoting_cdm_(remoting_cdm) {} | 20 : remoting_cdm_(remoting_cdm) {} |
20 | 21 |
(...skipping 12 matching lines...) Expand all Loading... |
33 | 34 |
34 int RemotingCdmContext::GetCdmId() const { | 35 int RemotingCdmContext::GetCdmId() const { |
35 // TODO(xjz): Merge with erickung's implementation. | 36 // TODO(xjz): Merge with erickung's implementation. |
36 return CdmContext::kInvalidCdmId; | 37 return CdmContext::kInvalidCdmId; |
37 } | 38 } |
38 | 39 |
39 void* RemotingCdmContext::GetClassIdentifier() const { | 40 void* RemotingCdmContext::GetClassIdentifier() const { |
40 return kClassIdentifier; | 41 return kClassIdentifier; |
41 } | 42 } |
42 | 43 |
43 RemotingSourceImpl* RemotingCdmContext::GetRemotingSource() { | 44 SharedSession* RemotingCdmContext::GetSharedSession() const { |
44 return remoting_cdm_->GetRemotingSource(); | 45 return remoting_cdm_->session(); |
45 } | 46 } |
46 | 47 |
| 48 } // namespace remoting |
47 } // namespace media | 49 } // namespace media |
OLD | NEW |