OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |