Chromium Code Reviews| Index: media/remoting/remoting_cdm_context.h |
| diff --git a/media/remoting/remoting_cdm_context.h b/media/remoting/remoting_cdm_context.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7a397c4e90a4f65f63290cb4abd6f3b65fc4414e |
| --- /dev/null |
| +++ b/media/remoting/remoting_cdm_context.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ |
| +#define MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ |
| + |
| +#include "media/base/cdm_context.h" |
| + |
| +namespace media { |
| + |
| +class RemotingCdm; |
| +class RemotingSourceImpl; |
| + |
| +// TODO(xjz): Merge this with erickung's implementation. |
| +class RemotingCdmContext : public CdmContext { |
| + public: |
| + RemotingCdmContext(RemotingCdm* remoting_cdm); |
|
xhwang
2016/11/02 06:47:05
explicit
xjz
2016/11/02 17:38:11
Done.
|
| + ~RemotingCdmContext() override; |
| + |
| + // If |cdm_context| is an instance of RemotingCdmContext, return a type-casted |
| + // pointer to it. Otherwise, return nullptr. |
| + static RemotingCdmContext* From(CdmContext* cdm_context); |
| + |
| + RemotingSourceImpl* GetRemotingSource(); |
| + |
| + // CdmContext implementations. |
| + Decryptor* GetDecryptor() override; |
| + int GetCdmId() const override; |
| + void* GetClassIdentifier() const override; |
| + |
| + private: |
| + RemotingCdm* const remoting_cdm_; |
|
xhwang
2016/11/02 06:47:05
Please add a comment about lifetime.
xjz
2016/11/02 17:38:11
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(RemotingCdmContext); |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ |