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

Side by Side Diff: media/blink/cdm_session_adapter.cc

Issue 813683005: Add |legacy_destination_url| back to SessionMessage for EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Created 5 years, 11 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 | « media/blink/cdm_session_adapter.h ('k') | media/cdm/aes_decryptor.cc » ('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 "media/blink/cdm_session_adapter.h" 5 #include "media/blink/cdm_session_adapter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 CdmContext* CdmSessionAdapter::GetCdmContext() { 112 CdmContext* CdmSessionAdapter::GetCdmContext() {
113 return media_keys_->GetCdmContext(); 113 return media_keys_->GetCdmContext();
114 } 114 }
115 115
116 const std::string& CdmSessionAdapter::GetKeySystemUMAPrefix() const { 116 const std::string& CdmSessionAdapter::GetKeySystemUMAPrefix() const {
117 return key_system_uma_prefix_; 117 return key_system_uma_prefix_;
118 } 118 }
119 119
120 void CdmSessionAdapter::OnSessionMessage(const std::string& web_session_id, 120 void CdmSessionAdapter::OnSessionMessage(
121 MediaKeys::MessageType message_type, 121 const std::string& web_session_id,
122 const std::vector<uint8>& message) { 122 MediaKeys::MessageType message_type,
123 const std::vector<uint8>& message,
124 const GURL& /* legacy_destination_url */) {
123 WebContentDecryptionModuleSessionImpl* session = GetSession(web_session_id); 125 WebContentDecryptionModuleSessionImpl* session = GetSession(web_session_id);
124 DLOG_IF(WARNING, !session) << __FUNCTION__ << " for unknown session " 126 DLOG_IF(WARNING, !session) << __FUNCTION__ << " for unknown session "
125 << web_session_id; 127 << web_session_id;
126 if (session) 128 if (session)
127 session->OnSessionMessage(message_type, message); 129 session->OnSessionMessage(message_type, message);
128 } 130 }
129 131
130 void CdmSessionAdapter::OnSessionKeysChange(const std::string& web_session_id, 132 void CdmSessionAdapter::OnSessionKeysChange(const std::string& web_session_id,
131 bool has_additional_usable_key, 133 bool has_additional_usable_key,
132 CdmKeysInfo keys_info) { 134 CdmKeysInfo keys_info) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession( 170 WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession(
169 const std::string& web_session_id) { 171 const std::string& web_session_id) {
170 // Since session objects may get garbage collected, it is possible that there 172 // Since session objects may get garbage collected, it is possible that there
171 // are events coming back from the CDM and the session has been unregistered. 173 // are events coming back from the CDM and the session has been unregistered.
172 // We can not tell if the CDM is firing events at sessions that never existed. 174 // We can not tell if the CDM is firing events at sessions that never existed.
173 SessionMap::iterator session = sessions_.find(web_session_id); 175 SessionMap::iterator session = sessions_.find(web_session_id);
174 return (session != sessions_.end()) ? session->second.get() : NULL; 176 return (session != sessions_.end()) ? session->second.get() : NULL;
175 } 177 }
176 178
177 } // namespace media 179 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/cdm_session_adapter.h ('k') | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698