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

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

Issue 651113002: Move CdmResultPromise to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
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"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "content/renderer/media/cdm_result_promise.h"
16 #include "content/renderer/media/cdm_session_adapter.h" 15 #include "content/renderer/media/cdm_session_adapter.h"
17 #include "content/renderer/media/crypto/key_systems.h" 16 #include "content/renderer/media/crypto/key_systems.h"
18 #include "content/renderer/media/webcontentdecryptionmodulesession_impl.h" 17 #include "content/renderer/media/webcontentdecryptionmodulesession_impl.h"
19 #include "media/base/cdm_promise.h" 18 #include "media/base/cdm_promise.h"
20 #include "media/base/media_keys.h" 19 #include "media/base/media_keys.h"
20 #include "media/blink/cdm_result_promise.h"
21 #include "third_party/WebKit/public/platform/WebString.h" 21 #include "third_party/WebKit/public/platform/WebString.h"
22 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" 22 #include "third_party/WebKit/public/web/WebSecurityOrigin.h"
23 #include "url/gurl.h" 23 #include "url/gurl.h"
24 24
25 #if defined(ENABLE_PEPPER_CDMS) 25 #if defined(ENABLE_PEPPER_CDMS)
26 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h" 26 #include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h"
27 #endif 27 #endif
28 28
29 namespace content { 29 namespace content {
30 30
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 void WebContentDecryptionModuleImpl::setServerCertificate( 103 void WebContentDecryptionModuleImpl::setServerCertificate(
104 const uint8* server_certificate, 104 const uint8* server_certificate,
105 size_t server_certificate_length, 105 size_t server_certificate_length,
106 blink::WebContentDecryptionModuleResult result) { 106 blink::WebContentDecryptionModuleResult result) {
107 DCHECK(server_certificate); 107 DCHECK(server_certificate);
108 adapter_->SetServerCertificate( 108 adapter_->SetServerCertificate(
109 server_certificate, 109 server_certificate,
110 server_certificate_length, 110 server_certificate_length,
111 scoped_ptr<media::SimpleCdmPromise>( 111 scoped_ptr<media::SimpleCdmPromise>(
112 new CdmResultPromise<>(result, std::string()))); 112 new media::CdmResultPromise<>(result, std::string())));
113 } 113 }
114 114
115 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() { 115 media::Decryptor* WebContentDecryptionModuleImpl::GetDecryptor() {
116 return adapter_->GetDecryptor(); 116 return adapter_->GetDecryptor();
117 } 117 }
118 118
119 #if defined(ENABLE_BROWSER_CDMS) 119 #if defined(ENABLE_BROWSER_CDMS)
120 int WebContentDecryptionModuleImpl::GetCdmId() const { 120 int WebContentDecryptionModuleImpl::GetCdmId() const {
121 return adapter_->GetCdmId(); 121 return adapter_->GetCdmId();
122 } 122 }
123 #endif // defined(ENABLE_BROWSER_CDMS) 123 #endif // defined(ENABLE_BROWSER_CDMS)
124 124
125 } // namespace content 125 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/cdm_result_promise.cc ('k') | content/renderer/media/webcontentdecryptionmodulesession_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698