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

Side by Side Diff: content/renderer/media/webcontentdecryptionmodule_impl.cc

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 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" 5 #include "content/renderer/media/webcontentdecryptionmodule_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 21 matching lines...) Expand all
32 32
33 scoped_refptr<CdmSessionAdapter> adapter(new CdmSessionAdapter()); 33 scoped_refptr<CdmSessionAdapter> adapter(new CdmSessionAdapter());
34 if (!adapter->Initialize( 34 if (!adapter->Initialize(
35 #if defined(ENABLE_PEPPER_CDMS) 35 #if defined(ENABLE_PEPPER_CDMS)
36 // TODO(jrummell): Figure out how to get a WebFrame from Blink (or 36 // TODO(jrummell): Figure out how to get a WebFrame from Blink (or
37 // something equivalent) so the plugin can actually get created. 37 // something equivalent) so the plugin can actually get created.
38 // http://crbug.com/250049 38 // http://crbug.com/250049
39 base::Bind(&PepperCdmWrapperImpl::Create, 39 base::Bind(&PepperCdmWrapperImpl::Create,
40 static_cast<blink::WebFrame*>(NULL)), 40 static_cast<blink::WebFrame*>(NULL)),
41 #endif 41 #endif
42 UTF16ToASCII(key_system))) { 42 UTF16ToASCII(key_system))) {
ddorwin 2014/03/11 18:05:14 Let's have an output parameter for the CDM ID and
xhwang 2014/03/12 01:07:52 Done.
43 return NULL; 43 return NULL;
44 } 44 }
45 45
46 return new WebContentDecryptionModuleImpl(adapter); 46 return new WebContentDecryptionModuleImpl(adapter);
47 } 47 }
48 48
49 WebContentDecryptionModuleImpl::WebContentDecryptionModuleImpl( 49 WebContentDecryptionModuleImpl::WebContentDecryptionModuleImpl(
50 scoped_refptr<CdmSessionAdapter> adapter) 50 scoped_refptr<CdmSessionAdapter> adapter)
51 : adapter_(adapter) { 51 : adapter_(adapter) {
52 } 52 }
53 53
54 WebContentDecryptionModuleImpl::~WebContentDecryptionModuleImpl() { 54 WebContentDecryptionModuleImpl::~WebContentDecryptionModuleImpl() {
55 } 55 }
56 56
57 // The caller owns the created session. 57 // The caller owns the created session.
58 blink::WebContentDecryptionModuleSession* 58 blink::WebContentDecryptionModuleSession*
59 WebContentDecryptionModuleImpl::createSession( 59 WebContentDecryptionModuleImpl::createSession(
60 blink::WebContentDecryptionModuleSession::Client* client) { 60 blink::WebContentDecryptionModuleSession::Client* client) {
61 return adapter_->CreateSession(client); 61 return adapter_->CreateSession(client);
62 } 62 }
63 63
64 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() { 64 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() {
65 return adapter_->GetDecryptor(); 65 return adapter_->GetDecryptor();
66 } 66 }
67 67
68 int WebContentDecryptionModuleImpl::GetCdmId() {
69 return adapter_->GetCdmId();
70 }
71
68 } // namespace content 72 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698