Index: content/renderer/media/webcontentdecryptionmodule_impl.cc |
diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.cc b/content/renderer/media/webcontentdecryptionmodule_impl.cc |
index 2c363ce4f78f8b6f8f752e8b19cdf6383b2a5c19..3c2a59d1bc54b05f67314b101a1bd3a6ea8bd70b 100644 |
--- a/content/renderer/media/webcontentdecryptionmodule_impl.cc |
+++ b/content/renderer/media/webcontentdecryptionmodule_impl.cc |
@@ -32,28 +32,28 @@ class ReferenceIdAdapter { |
scoped_ptr<media::MediaKeys>* media_keys); |
// Adds a session to the internal map. Does not take ownership of the session. |
- void AddSession(uint32 reference_id, |
+ void AddSession(uint32 session_id, |
WebContentDecryptionModuleSessionImpl* session); |
// Removes a session from the internal map. |
- void RemoveSession(uint32 reference_id); |
+ void RemoveSession(uint32 session_id); |
private: |
typedef std::map<uint32, WebContentDecryptionModuleSessionImpl*> SessionMap; |
// Callbacks for firing session events. |
- void OnSessionCreated(uint32 reference_id, const std::string& session_id); |
- void OnSessionMessage(uint32 reference_id, |
+ void OnSessionCreated(uint32 session_id, const std::string& web_session_id); |
+ void OnSessionMessage(uint32 session_id, |
const std::vector<uint8>& message, |
const std::string& destination_url); |
- void OnSessionReady(uint32 reference_id); |
- void OnSessionClosed(uint32 reference_id); |
- void OnSessionError(uint32 reference_id, |
+ void OnSessionReady(uint32 session_id); |
+ void OnSessionClosed(uint32 session_id); |
+ void OnSessionError(uint32 session_id, |
media::MediaKeys::KeyError error_code, |
int system_code); |
// Helper function of the callbacks. |
- WebContentDecryptionModuleSessionImpl* GetSession(uint32 reference_id); |
+ WebContentDecryptionModuleSessionImpl* GetSession(uint32 session_id); |
base::WeakPtrFactory<ReferenceIdAdapter> weak_ptr_factory_; |
@@ -104,46 +104,46 @@ bool ReferenceIdAdapter::Initialize(const std::string& key_system, |
} |
void ReferenceIdAdapter::AddSession( |
- uint32 reference_id, |
+ uint32 session_id, |
WebContentDecryptionModuleSessionImpl* session) { |
- DCHECK(sessions_.find(reference_id) == sessions_.end()); |
- sessions_[reference_id] = session; |
+ DCHECK(sessions_.find(session_id) == sessions_.end()); |
+ sessions_[session_id] = session; |
} |
-void ReferenceIdAdapter::RemoveSession(uint32 reference_id) { |
- DCHECK(sessions_.find(reference_id) != sessions_.end()); |
- sessions_.erase(reference_id); |
+void ReferenceIdAdapter::RemoveSession(uint32 session_id) { |
+ DCHECK(sessions_.find(session_id) != sessions_.end()); |
+ sessions_.erase(session_id); |
} |
-void ReferenceIdAdapter::OnSessionCreated(uint32 reference_id, |
- const std::string& session_id) { |
- GetSession(reference_id)->OnSessionCreated(session_id); |
+void ReferenceIdAdapter::OnSessionCreated(uint32 session_id, |
+ const std::string& web_session_id) { |
+ GetSession(session_id)->OnSessionCreated(web_session_id); |
} |
-void ReferenceIdAdapter::OnSessionMessage(uint32 reference_id, |
+void ReferenceIdAdapter::OnSessionMessage(uint32 session_id, |
const std::vector<uint8>& message, |
const std::string& destination_url) { |
- GetSession(reference_id)->OnSessionMessage(message, destination_url); |
+ GetSession(session_id)->OnSessionMessage(message, destination_url); |
} |
-void ReferenceIdAdapter::OnSessionReady(uint32 reference_id) { |
- GetSession(reference_id)->OnSessionReady(); |
+void ReferenceIdAdapter::OnSessionReady(uint32 session_id) { |
+ GetSession(session_id)->OnSessionReady(); |
} |
-void ReferenceIdAdapter::OnSessionClosed(uint32 reference_id) { |
- GetSession(reference_id)->OnSessionClosed(); |
+void ReferenceIdAdapter::OnSessionClosed(uint32 session_id) { |
+ GetSession(session_id)->OnSessionClosed(); |
} |
-void ReferenceIdAdapter::OnSessionError(uint32 reference_id, |
+void ReferenceIdAdapter::OnSessionError(uint32 session_id, |
media::MediaKeys::KeyError error_code, |
int system_code) { |
- GetSession(reference_id)->OnSessionError(error_code, system_code); |
+ GetSession(session_id)->OnSessionError(error_code, system_code); |
} |
WebContentDecryptionModuleSessionImpl* ReferenceIdAdapter::GetSession( |
- uint32 reference_id) { |
- DCHECK(sessions_.find(reference_id) != sessions_.end()); |
- return sessions_[reference_id]; |
+ uint32 session_id) { |
+ DCHECK(sessions_.find(session_id) != sessions_.end()); |
+ return sessions_[session_id]; |
} |
//------------------------------------------------------------------------------ |
@@ -189,12 +189,12 @@ WebContentDecryptionModuleImpl::createSession( |
base::Bind(&WebContentDecryptionModuleImpl::OnSessionClosed, |
base::Unretained(this))); |
- adapter_->AddSession(session->reference_id(), session); |
+ adapter_->AddSession(session->session_id(), session); |
return session; |
} |
-void WebContentDecryptionModuleImpl::OnSessionClosed(uint32 reference_id) { |
- adapter_->RemoveSession(reference_id); |
+void WebContentDecryptionModuleImpl::OnSessionClosed(uint32 session_id) { |
+ adapter_->RemoveSession(session_id); |
} |
} // namespace content |