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

Side by Side Diff: content/renderer/media/webcontentdecryptionmodule_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 18 matching lines...) Expand all
29 const base::string16& key_system); 29 const base::string16& key_system);
30 30
31 virtual ~WebContentDecryptionModuleImpl(); 31 virtual ~WebContentDecryptionModuleImpl();
32 32
33 // Returns the Decryptor associated with this CDM. May be NULL if no 33 // Returns the Decryptor associated with this CDM. May be NULL if no
34 // Decryptor associated with the MediaKeys object. 34 // Decryptor associated with the MediaKeys object.
35 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor 35 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor
36 // after WebContentDecryptionModule is freed. http://crbug.com/330324 36 // after WebContentDecryptionModule is freed. http://crbug.com/330324
37 media::Decryptor* GetDecryptor(); 37 media::Decryptor* GetDecryptor();
38 38
39 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no
40 // CDM ID is associated.
41 int GetCdmId();
42
39 // blink::WebContentDecryptionModule implementation. 43 // blink::WebContentDecryptionModule implementation.
40 virtual blink::WebContentDecryptionModuleSession* createSession( 44 virtual blink::WebContentDecryptionModuleSession* createSession(
41 blink::WebContentDecryptionModuleSession::Client* client); 45 blink::WebContentDecryptionModuleSession::Client* client);
42 46
43 private: 47 private:
44 // Takes reference to |adapter|. 48 // Takes reference to |adapter|.
45 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); 49 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter);
46 50
47 scoped_refptr<CdmSessionAdapter> adapter_; 51 scoped_refptr<CdmSessionAdapter> adapter_;
48 52
49 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); 53 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl);
50 }; 54 };
51 55
52 // Allow typecasting from blink type as this is the only implementation. 56 // Allow typecasting from blink type as this is the only implementation.
53 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( 57 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl(
54 blink::WebContentDecryptionModule* cdm) { 58 blink::WebContentDecryptionModule* cdm) {
55 return static_cast<WebContentDecryptionModuleImpl*>(cdm); 59 return static_cast<WebContentDecryptionModuleImpl*>(cdm);
56 } 60 }
57 61
58 } // namespace content 62 } // namespace content
59 63
60 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 64 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698