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

Side by Side Diff: media/blink/webcontentdecryptionmodule_impl.cc

Issue 2402563002: Keep reference to CDM to avoid it's premature destruction (Closed)
Patch Set: nits Created 4 years, 2 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
« no previous file with comments | « media/blink/webcontentdecryptionmodule_impl.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/blink/webcontentdecryptionmodule_impl.h" 5 #include "media/blink/webcontentdecryptionmodule_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 size_t server_certificate_length, 94 size_t server_certificate_length,
95 blink::WebContentDecryptionModuleResult result) { 95 blink::WebContentDecryptionModuleResult result) {
96 DCHECK(server_certificate); 96 DCHECK(server_certificate);
97 adapter_->SetServerCertificate( 97 adapter_->SetServerCertificate(
98 std::vector<uint8_t>(server_certificate, 98 std::vector<uint8_t>(server_certificate,
99 server_certificate + server_certificate_length), 99 server_certificate + server_certificate_length),
100 std::unique_ptr<SimpleCdmPromise>( 100 std::unique_ptr<SimpleCdmPromise>(
101 new CdmResultPromise<>(result, std::string()))); 101 new CdmResultPromise<>(result, std::string())));
102 } 102 }
103 103
104 CdmContext* WebContentDecryptionModuleImpl::GetCdmContext() { 104 scoped_refptr<MediaKeys> WebContentDecryptionModuleImpl::GetCdm() {
105 return adapter_->GetCdmContext(); 105 return adapter_->GetCdm();
106 } 106 }
107 107
108 } // namespace media 108 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webcontentdecryptionmodule_impl.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698