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

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

Issue 380953002: Set callback interface on WebCDMSessionImpl after creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + change Created 6 years, 5 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
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698