OLD | NEW |
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 WebContentDecryptionModuleImpl::WebContentDecryptionModuleImpl( | 79 WebContentDecryptionModuleImpl::WebContentDecryptionModuleImpl( |
80 scoped_refptr<CdmSessionAdapter> adapter) | 80 scoped_refptr<CdmSessionAdapter> adapter) |
81 : adapter_(adapter) {} | 81 : adapter_(adapter) {} |
82 | 82 |
83 WebContentDecryptionModuleImpl::~WebContentDecryptionModuleImpl() { | 83 WebContentDecryptionModuleImpl::~WebContentDecryptionModuleImpl() { |
84 } | 84 } |
85 | 85 |
86 // The caller owns the created session. | 86 // The caller owns the created session. |
87 blink::WebContentDecryptionModuleSession* | 87 blink::WebContentDecryptionModuleSession* |
| 88 WebContentDecryptionModuleImpl::createSession() { |
| 89 return adapter_->CreateSession(); |
| 90 } |
| 91 |
| 92 blink::WebContentDecryptionModuleSession* |
88 WebContentDecryptionModuleImpl::createSession( | 93 WebContentDecryptionModuleImpl::createSession( |
89 blink::WebContentDecryptionModuleSession::Client* client) { | 94 blink::WebContentDecryptionModuleSession::Client* client) { |
90 return adapter_->CreateSession(client); | 95 WebContentDecryptionModuleSessionImpl* session = adapter_->CreateSession(); |
| 96 session->setClientInterface(client); |
| 97 return session; |
91 } | 98 } |
92 | 99 |
93 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() { | 100 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() { |
94 return adapter_->GetDecryptor(); | 101 return adapter_->GetDecryptor(); |
95 } | 102 } |
96 | 103 |
97 #if defined(ENABLE_BROWSER_CDMS) | 104 #if defined(ENABLE_BROWSER_CDMS) |
98 int WebContentDecryptionModuleImpl::GetCdmId() const { | 105 int WebContentDecryptionModuleImpl::GetCdmId() const { |
99 return adapter_->GetCdmId(); | 106 return adapter_->GetCdmId(); |
100 } | 107 } |
101 #endif // defined(ENABLE_BROWSER_CDMS) | 108 #endif // defined(ENABLE_BROWSER_CDMS) |
102 | 109 |
103 } // namespace content | 110 } // namespace content |
OLD | NEW |