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

Side by Side Diff: content/renderer/media/cdm_session_adapter.h

Issue 193523002: Encrypted Media: Implement IPC based SetCdm(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 #ifndef CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
6 #define CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 6 #define CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // Releases the session specified by |session_id|. 59 // Releases the session specified by |session_id|.
60 void ReleaseSession(uint32 session_id); 60 void ReleaseSession(uint32 session_id);
61 61
62 // Returns the Decryptor associated with this CDM. May be NULL if no 62 // Returns the Decryptor associated with this CDM. May be NULL if no
63 // Decryptor is associated with the MediaKeys object. 63 // Decryptor is associated with the MediaKeys object.
64 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor 64 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor
65 // after WebContentDecryptionModule is freed. http://crbug.com/330324 65 // after WebContentDecryptionModule is freed. http://crbug.com/330324
66 media::Decryptor* GetDecryptor(); 66 media::Decryptor* GetDecryptor();
67 67
68 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no
ddorwin 2014/03/11 04:06:33 Why does any of the Blink code (here and WCDM_impl
ddorwin 2014/03/11 18:05:14 As discussed, this is only for being able to tell
xhwang 2014/03/12 01:07:52 Done.
69 // CDM ID is associated.
70 int GetCdmId();
71
68 private: 72 private:
69 friend class base::RefCounted<CdmSessionAdapter>; 73 friend class base::RefCounted<CdmSessionAdapter>;
70 typedef std::map<uint32, WebContentDecryptionModuleSessionImpl*> SessionMap; 74 typedef std::map<uint32, WebContentDecryptionModuleSessionImpl*> SessionMap;
71 75
72 ~CdmSessionAdapter(); 76 ~CdmSessionAdapter();
73 77
74 // Callbacks for firing session events. 78 // Callbacks for firing session events.
75 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); 79 void OnSessionCreated(uint32 session_id, const std::string& web_session_id);
76 void OnSessionMessage(uint32 session_id, 80 void OnSessionMessage(uint32 session_id,
77 const std::vector<uint8>& message, 81 const std::vector<uint8>& message,
(...skipping 15 matching lines...) Expand all
93 97
94 // Session ID should be unique per renderer process for debugging purposes. 98 // Session ID should be unique per renderer process for debugging purposes.
95 static uint32 next_session_id_; 99 static uint32 next_session_id_;
96 100
97 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); 101 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter);
98 }; 102 };
99 103
100 } // namespace content 104 } // namespace content
101 105
102 #endif // CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 106 #endif // CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698