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

Unified Diff: content/renderer/media/webcontentdecryptionmodulesession_impl.h

Issue 171073002: Move SessionIdAdapter out of WebContentDecryptionModuleImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const refptr Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webcontentdecryptionmodulesession_impl.h
diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.h b/content/renderer/media/webcontentdecryptionmodulesession_impl.h
index 64a12ef1494179cc12b0ebff9d50e06ff85921d4..53488cb93ff290e950a6953983429e04847009f0 100644
--- a/content/renderer/media/webcontentdecryptionmodulesession_impl.h
+++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/memory/ref_counted.h"
#include "media/base/media_keys.h"
#include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -19,17 +20,15 @@ class MediaKeys;
}
namespace content {
+class CdmSessionAdapter;
class WebContentDecryptionModuleSessionImpl
: public blink::WebContentDecryptionModuleSession {
public:
- typedef base::Callback<void(uint32 session_id)> SessionClosedCB;
-
WebContentDecryptionModuleSessionImpl(
uint32 session_id,
- media::MediaKeys* media_keys,
Client* client,
- const SessionClosedCB& session_closed_cb);
+ const scoped_refptr<CdmSessionAdapter>& adapter);
virtual ~WebContentDecryptionModuleSessionImpl();
// blink::WebContentDecryptionModuleSession implementation.
@@ -49,11 +48,10 @@ class WebContentDecryptionModuleSessionImpl
void OnSessionError(media::MediaKeys::KeyError error_code, int system_code);
private:
- // Non-owned pointers.
- media::MediaKeys* media_keys_;
- Client* client_;
+ scoped_refptr<CdmSessionAdapter> adapter_;
- SessionClosedCB session_closed_cb_;
+ // Non-owned pointer.
+ Client* client_;
// Web session ID is the app visible ID for this session generated by the CDM.
// This value is not set until the CDM calls OnSessionCreated().

Powered by Google App Engine
This is Rietveld 408576698