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

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

Issue 2457563002: Media Remoting: Add remoting control logic for encrypted contents. (Closed)
Patch Set: Addressed xhwang's comments. 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
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.h"
6
7 #include "media/base/cdm_promise.h"
8
9 namespace media {
10
11 // TODO(xjz): Merge this with erickung's implementation.
12 RemotingCdm::RemotingCdm(
13 const std::string& key_system,
14 const GURL& security_origin,
15 const CdmConfig& cdm_config,
16 const SessionMessageCB& session_message_cb,
17 const SessionClosedCB& session_closed_cb,
18 const SessionKeysChangeCB& session_keys_change_cb,
19 const SessionExpirationUpdateCB& session_expiration_update_cb,
20 const CdmCreatedCB& cdm_created_cb,
21 std::unique_ptr<RemotingCdmController> remoting_cdm_controller)
22 : remoting_cdm_controller_(std::move(remoting_cdm_controller)),
23 remoting_cdm_context_(this) {
24 DCHECK(remoting_cdm_controller_);
25
26 // TODO(xjz): Not implemented. Need to merge with erickung's implementation.
27 }
28
29 RemotingCdm::~RemotingCdm() {}
30
31 void RemotingCdm::SetServerCertificate(
32 const std::vector<uint8_t>& certificate,
33 std::unique_ptr<SimpleCdmPromise> promise) {
34 // TODO(xjz): Merge with erickung's implementation.
35 NOTIMPLEMENTED();
36 }
37
38 void RemotingCdm::CreateSessionAndGenerateRequest(
39 SessionType session_type,
40 EmeInitDataType init_data_type,
41 const std::vector<uint8_t>& init_data,
42 std::unique_ptr<NewSessionCdmPromise> promise) {
43 // TODO(xjz): Merge with erickung's implementation.
44 NOTIMPLEMENTED();
45 }
46
47 void RemotingCdm::LoadSession(SessionType session_type,
48 const std::string& session_id,
49 std::unique_ptr<NewSessionCdmPromise> promise) {
50 // TODO(xjz): Merge with erickung's implementation.
51 NOTIMPLEMENTED();
52 }
53
54 void RemotingCdm::UpdateSession(const std::string& session_id,
55 const std::vector<uint8_t>& response,
56 std::unique_ptr<SimpleCdmPromise> promise) {
57 // TODO(xjz): Merge with erickung's implementation.
58 NOTIMPLEMENTED();
59 }
60
61 void RemotingCdm::CloseSession(const std::string& session_id,
62 std::unique_ptr<SimpleCdmPromise> promise) {
63 // TODO(xjz): Merge with erickung's implementation.
64 NOTIMPLEMENTED();
65 }
66
67 void RemotingCdm::RemoveSession(const std::string& session_id,
68 std::unique_ptr<SimpleCdmPromise> promise) {
69 // TODO(xjz): Merge with erickung's implementation.
70 NOTIMPLEMENTED();
71 }
72
73 CdmContext* RemotingCdm::GetCdmContext() {
74 return &remoting_cdm_context_;
75 }
76
77 RemotingSourceImpl* RemotingCdm::GetRemotingSource() {
78 return remoting_cdm_controller_->remoting_source();
79 }
80
81 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698