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

Side by Side Diff: content/renderer/media/crypto/proxy_media_keys.cc

Issue 835683002: media: Always define |cdm_id| in CdmContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 9 months 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 | « content/renderer/media/crypto/ppapi_decryptor.cc ('k') | media/base/cdm_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/crypto/proxy_media_keys.h" 5 #include "content/renderer/media/crypto/proxy_media_keys.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // TODO(xhwang): Check key system and platform support for LoadSession in 118 // TODO(xhwang): Check key system and platform support for LoadSession in
119 // blink and add NOTREACHED() here. See http://crbug.com/384152 119 // blink and add NOTREACHED() here. See http://crbug.com/384152
120 promise->reject(NOT_SUPPORTED_ERROR, 0, "RemoveSession() not supported."); 120 promise->reject(NOT_SUPPORTED_ERROR, 0, "RemoveSession() not supported.");
121 } 121 }
122 122
123 media::CdmContext* ProxyMediaKeys::GetCdmContext() { 123 media::CdmContext* ProxyMediaKeys::GetCdmContext() {
124 return this; 124 return this;
125 } 125 }
126 126
127 media::Decryptor* ProxyMediaKeys::GetDecryptor() { 127 media::Decryptor* ProxyMediaKeys::GetDecryptor() {
128 return NULL; 128 return nullptr;
129 } 129 }
130 130
131 int ProxyMediaKeys::GetCdmId() const { 131 int ProxyMediaKeys::GetCdmId() const {
132 return cdm_id_; 132 return cdm_id_;
133 } 133 }
134 134
135 void ProxyMediaKeys::OnSessionMessage( 135 void ProxyMediaKeys::OnSessionMessage(
136 const std::string& session_id, 136 const std::string& session_id,
137 media::MediaKeys::MessageType message_type, 137 media::MediaKeys::MessageType message_type,
138 const std::vector<uint8>& message, 138 const std::vector<uint8>& message,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 session_expiration_update_cb_(session_expiration_update_cb) { 198 session_expiration_update_cb_(session_expiration_update_cb) {
199 cdm_id_ = manager->RegisterMediaKeys(this); 199 cdm_id_ = manager->RegisterMediaKeys(this);
200 } 200 }
201 201
202 void ProxyMediaKeys::InitializeCdm(const std::string& key_system, 202 void ProxyMediaKeys::InitializeCdm(const std::string& key_system,
203 const GURL& security_origin) { 203 const GURL& security_origin) {
204 manager_->InitializeCdm(cdm_id_, this, key_system, security_origin); 204 manager_->InitializeCdm(cdm_id_, this, key_system, security_origin);
205 } 205 }
206 206
207 } // namespace content 207 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/crypto/ppapi_decryptor.cc ('k') | media/base/cdm_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698