Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ | |
| 6 #define MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ | |
| 7 | |
| 8 #include "media/base/cdm_context.h" | |
| 9 | |
| 10 namespace media { | |
| 11 | |
| 12 class RemotingCdm; | |
| 13 class RemotingSourceImpl; | |
| 14 | |
| 15 // TODO(xjz): Merge this with erickung's implementation. | |
| 16 class RemotingCdmContext : public CdmContext { | |
| 17 public: | |
| 18 explicit RemotingCdmContext(RemotingCdm* remoting_cdm); | |
| 19 ~RemotingCdmContext() override; | |
| 20 | |
| 21 // If |cdm_context| is an instance of RemotingCdmContext, return a type-casted | |
| 22 // pointer to it. Otherwise, return nullptr. | |
| 23 static RemotingCdmContext* From(CdmContext* cdm_context); | |
| 24 | |
| 25 RemotingSourceImpl* GetRemotingSource(); | |
|
xhwang
2016/11/05 02:39:58
based on the discussion, please update this to ret
xjz
2016/11/07 19:03:54
Based on previous discussion (comments), I decide
xhwang
2016/11/08 17:39:20
When the returned value is stored in another scope
| |
| 26 | |
| 27 // CdmContext implementations. | |
| 28 Decryptor* GetDecryptor() override; | |
| 29 int GetCdmId() const override; | |
| 30 void* GetClassIdentifier() const override; | |
| 31 | |
| 32 private: | |
| 33 RemotingCdm* const remoting_cdm_; // Outlives this class. | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(RemotingCdmContext); | |
| 36 }; | |
| 37 | |
| 38 } // namespace media | |
| 39 | |
| 40 #endif // MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ | |
| OLD | NEW |