Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Unified Diff: media/remoting/remoting_cdm_context.h

Issue 2457563002: Media Remoting: Add remoting control logic for encrypted contents. (Closed)
Patch Set: Addressed comments from PS#12. Fixed ASAN. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/remoting/remoting_cdm.cc ('k') | media/remoting/remoting_cdm_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f7c3284d1baccaac47d7c380915b41db34e3f4bf
--- /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:
+ explicit RemotingCdmContext(RemotingCdm* remoting_cdm);
+ ~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_; // Outlives this class.
+
+ DISALLOW_COPY_AND_ASSIGN(RemotingCdmContext);
+};
+
+} // namespace media
+
+#endif // MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_
« no previous file with comments | « media/remoting/remoting_cdm.cc ('k') | media/remoting/remoting_cdm_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698