diff options
author | jrummell@chromium.org <jrummell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-20 13:47:54 +0000 |
---|---|---|
committer | jrummell@chromium.org <jrummell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-20 13:47:54 +0000 |
commit | f42e6e2d8397bfa02157565e9c96b0f15755814d (patch) | |
tree | c5c5432f797445a01b362d128e090db3d6a95e93 /content/renderer/media/webcontentdecryptionmodule_impl.h | |
parent | 8a9990c9cc174818a94abcb97a5f5807d4f706cf (diff) | |
download | chromium_src-f42e6e2d8397bfa02157565e9c96b0f15755814d.zip chromium_src-f42e6e2d8397bfa02157565e9c96b0f15755814d.tar.gz chromium_src-f42e6e2d8397bfa02157565e9c96b0f15755814d.tar.bz2 |
Move SessionIdAdapter out of WebContentDecryptionModuleImpl
In order to manage the lifetime of the CDM, have WebContentDecryptionModuleImpl
and WebContentDecryptionModuleSessionImpl both keep RefPtrs to SessionIdAdapter
(now renamed CdmSessionAdapter). CdmSessionAdapter owns the MediaKeys object,
so the CDM gets destroyed when there is no more need for it.
BUG=341567
TEST=EME content tests pass
Review URL: https://codereview.chromium.org/171073002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252226 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media/webcontentdecryptionmodule_impl.h')
-rw-r--r-- | content/renderer/media/webcontentdecryptionmodule_impl.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.h b/content/renderer/media/webcontentdecryptionmodule_impl.h index 50cf6d1..6ec3a95 100644 --- a/content/renderer/media/webcontentdecryptionmodule_impl.h +++ b/content/renderer/media/webcontentdecryptionmodule_impl.h @@ -7,6 +7,7 @@ #include <string> +#include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" @@ -18,8 +19,8 @@ class MediaKeys; namespace content { +class CdmSessionAdapter; class WebContentDecryptionModuleSessionImpl; -class SessionIdAdapter; class WebContentDecryptionModuleImpl : public blink::WebContentDecryptionModule { @@ -40,15 +41,10 @@ class WebContentDecryptionModuleImpl blink::WebContentDecryptionModuleSession::Client* client); private: - // Takes ownership of |media_keys| and |adapter|. - WebContentDecryptionModuleImpl(scoped_ptr<media::MediaKeys> media_keys, - scoped_ptr<SessionIdAdapter> adapter); + // Takes reference to |adapter|. + WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); - // Called when a WebContentDecryptionModuleSessionImpl is closed. - void OnSessionClosed(uint32 session_id); - - scoped_ptr<media::MediaKeys> media_keys_; - scoped_ptr<SessionIdAdapter> adapter_; + scoped_refptr<CdmSessionAdapter> adapter_; DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); }; |