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

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: rebase only Created 6 years, 8 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 25 matching lines...) Expand all
36 const base::string16& key_system); 36 const base::string16& key_system);
37 37
38 virtual ~WebContentDecryptionModuleImpl(); 38 virtual ~WebContentDecryptionModuleImpl();
39 39
40 // Returns the Decryptor associated with this CDM. May be NULL if no 40 // Returns the Decryptor associated with this CDM. May be NULL if no
41 // Decryptor associated with the MediaKeys object. 41 // Decryptor associated with the MediaKeys object.
42 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor 42 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor
43 // after WebContentDecryptionModule is freed. http://crbug.com/330324 43 // after WebContentDecryptionModule is freed. http://crbug.com/330324
44 media::Decryptor* GetDecryptor(); 44 media::Decryptor* GetDecryptor();
45 45
46 #if defined(OS_ANDROID)
47 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no
48 // CDM ID is associated, such as when Clear Key is used.
49 int GetCdmId() const;
50 #endif // defined(OS_ANDROID)
51
46 // blink::WebContentDecryptionModule implementation. 52 // blink::WebContentDecryptionModule implementation.
47 virtual blink::WebContentDecryptionModuleSession* createSession( 53 virtual blink::WebContentDecryptionModuleSession* createSession(
48 blink::WebContentDecryptionModuleSession::Client* client); 54 blink::WebContentDecryptionModuleSession::Client* client);
49 55
50 private: 56 private:
51 // Takes reference to |adapter|. 57 // Takes reference to |adapter|.
52 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); 58 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter);
53 59
54 scoped_refptr<CdmSessionAdapter> adapter_; 60 scoped_refptr<CdmSessionAdapter> adapter_;
55 61
56 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); 62 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl);
57 }; 63 };
58 64
59 // Allow typecasting from blink type as this is the only implementation. 65 // Allow typecasting from blink type as this is the only implementation.
60 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( 66 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl(
61 blink::WebContentDecryptionModule* cdm) { 67 blink::WebContentDecryptionModule* cdm) {
62 return static_cast<WebContentDecryptionModuleImpl*>(cdm); 68 return static_cast<WebContentDecryptionModuleImpl*>(cdm);
63 } 69 }
64 70
65 } // namespace content 71 } // namespace content
66 72
67 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 73 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698