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

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

Powered by Google App Engine
This is Rietveld 408576698