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

Side by Side Diff: media/remoting/remoting_cdm_context.cc

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 unified diff | Download patch
« no previous file with comments | « media/remoting/remoting_cdm_context.h ('k') | media/remoting/remoting_cdm_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "media/remoting/remoting_cdm_context.h"
6
7 #include "media/remoting/remoting_cdm.h"
8 #include "media/remoting/remoting_source_impl.h"
9
10 namespace media {
11
12 namespace {
13 // Used as an identifier for RemotingCdmContext::From().
14 void* const kClassIdentifier = const_cast<void**>(&kClassIdentifier);
15 } // namespace
16
17 // TODO(xjz): Merge this with erickung's implementation.
18 RemotingCdmContext::RemotingCdmContext(RemotingCdm* remoting_cdm)
19 : remoting_cdm_(remoting_cdm) {}
20
21 RemotingCdmContext::~RemotingCdmContext() {}
22
23 RemotingCdmContext* RemotingCdmContext::From(CdmContext* cdm_context) {
24 if (cdm_context && cdm_context->GetClassIdentifier() == kClassIdentifier)
25 return static_cast<RemotingCdmContext*>(cdm_context);
26 return nullptr;
27 }
28
29 Decryptor* RemotingCdmContext::GetDecryptor() {
30 // TODO(xjz): Merge with erickung's implementation.
31 return nullptr;
32 }
33
34 int RemotingCdmContext::GetCdmId() const {
35 // TODO(xjz): Merge with erickung's implementation.
36 return CdmContext::kInvalidCdmId;
37 }
38
39 void* RemotingCdmContext::GetClassIdentifier() const {
40 return kClassIdentifier;
41 }
42
43 RemotingSourceImpl* RemotingCdmContext::GetRemotingSource() {
44 return remoting_cdm_->GetRemotingSource();
45 }
46
47 } // namespace media
OLDNEW
« no previous file with comments | « media/remoting/remoting_cdm_context.h ('k') | media/remoting/remoting_cdm_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698