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

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

Issue 2584893002: Use explicit WebString <-> string16 conversion methods in media files (Closed)
Patch Set: . Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/webencryptedmediaclient_impl.h" 5 #include "media/blink/webencryptedmediaclient_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/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 weak_factory_.GetWeakPtr(), request), 121 weak_factory_.GetWeakPtr(), request),
122 base::Bind(&WebEncryptedMediaClientImpl::OnRequestNotSupported, 122 base::Bind(&WebEncryptedMediaClientImpl::OnRequestNotSupported,
123 weak_factory_.GetWeakPtr(), request)); 123 weak_factory_.GetWeakPtr(), request));
124 } 124 }
125 125
126 void WebEncryptedMediaClientImpl::CreateCdm( 126 void WebEncryptedMediaClientImpl::CreateCdm(
127 const blink::WebString& key_system, 127 const blink::WebString& key_system,
128 const blink::WebSecurityOrigin& security_origin, 128 const blink::WebSecurityOrigin& security_origin,
129 const CdmConfig& cdm_config, 129 const CdmConfig& cdm_config,
130 std::unique_ptr<blink::WebContentDecryptionModuleResult> result) { 130 std::unique_ptr<blink::WebContentDecryptionModuleResult> result) {
131 WebContentDecryptionModuleImpl::Create( 131 WebContentDecryptionModuleImpl::Create(cdm_factory_, key_system.utf16(),
132 cdm_factory_, key_system, security_origin, cdm_config, std::move(result)); 132 security_origin, cdm_config,
133 std::move(result));
133 } 134 }
134 135
135 void WebEncryptedMediaClientImpl::OnRequestSucceeded( 136 void WebEncryptedMediaClientImpl::OnRequestSucceeded(
136 blink::WebEncryptedMediaRequest request, 137 blink::WebEncryptedMediaRequest request,
137 const blink::WebMediaKeySystemConfiguration& accumulated_configuration, 138 const blink::WebMediaKeySystemConfiguration& accumulated_configuration,
138 const CdmConfig& cdm_config) { 139 const CdmConfig& cdm_config) {
139 GetReporter(request.keySystem())->ReportSupported(); 140 GetReporter(request.keySystem())->ReportSupported();
140 // TODO(sandersd): Pass |are_secure_codecs_required| along and use it to 141 // TODO(sandersd): Pass |are_secure_codecs_required| along and use it to
141 // configure the CDM security level and use of secure surfaces on Android. 142 // configure the CDM security level and use of secure surfaces on Android.
142 143
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 std::string uma_name = GetKeySystemNameForUMA(key_system_ascii); 175 std::string uma_name = GetKeySystemNameForUMA(key_system_ascii);
175 Reporter* reporter = reporters_.get(uma_name); 176 Reporter* reporter = reporters_.get(uma_name);
176 if (!reporter) { 177 if (!reporter) {
177 reporter = new Reporter(uma_name); 178 reporter = new Reporter(uma_name);
178 reporters_.add(uma_name, base::WrapUnique(reporter)); 179 reporters_.add(uma_name, base::WrapUnique(reporter));
179 } 180 }
180 return reporter; 181 return reporter;
181 } 182 }
182 183
183 } // namespace media 184 } // namespace media
OLDNEW
« content/renderer/media/midi_message_filter.cc ('K') | « media/blink/key_system_config_selector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698