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

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

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 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 "webencryptedmediaclient_impl.h" 5 #include "media/blink/webencryptedmediaclient_impl.h"
6
7 #include <utility>
6 8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
9 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
11 #include "media/base/key_systems.h" 13 #include "media/base/key_systems.h"
12 #include "media/base/media_client.h" 14 #include "media/base/media_client.h"
13 #include "media/base/media_permission.h" 15 #include "media/base/media_permission.h"
14 #include "media/blink/webcontentdecryptionmodule_impl.h" 16 #include "media/blink/webcontentdecryptionmodule_impl.h"
15 #include "media/blink/webcontentdecryptionmoduleaccess_impl.h" 17 #include "media/blink/webcontentdecryptionmoduleaccess_impl.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 base::Bind(&WebEncryptedMediaClientImpl::OnRequestNotSupported, 119 base::Bind(&WebEncryptedMediaClientImpl::OnRequestNotSupported,
118 weak_factory_.GetWeakPtr(), request)); 120 weak_factory_.GetWeakPtr(), request));
119 } 121 }
120 122
121 void WebEncryptedMediaClientImpl::CreateCdm( 123 void WebEncryptedMediaClientImpl::CreateCdm(
122 const blink::WebString& key_system, 124 const blink::WebString& key_system,
123 const blink::WebSecurityOrigin& security_origin, 125 const blink::WebSecurityOrigin& security_origin,
124 const CdmConfig& cdm_config, 126 const CdmConfig& cdm_config,
125 scoped_ptr<blink::WebContentDecryptionModuleResult> result) { 127 scoped_ptr<blink::WebContentDecryptionModuleResult> result) {
126 WebContentDecryptionModuleImpl::Create( 128 WebContentDecryptionModuleImpl::Create(
127 cdm_factory_, key_system, security_origin, cdm_config, result.Pass()); 129 cdm_factory_, key_system, security_origin, cdm_config, std::move(result));
128 } 130 }
129 131
130 void WebEncryptedMediaClientImpl::OnRequestSucceeded( 132 void WebEncryptedMediaClientImpl::OnRequestSucceeded(
131 blink::WebEncryptedMediaRequest request, 133 blink::WebEncryptedMediaRequest request,
132 const blink::WebMediaKeySystemConfiguration& accumulated_configuration, 134 const blink::WebMediaKeySystemConfiguration& accumulated_configuration,
133 const CdmConfig& cdm_config) { 135 const CdmConfig& cdm_config) {
134 GetReporter(request.keySystem())->ReportSupported(); 136 GetReporter(request.keySystem())->ReportSupported();
135 // TODO(sandersd): Pass |are_secure_codecs_required| along and use it to 137 // TODO(sandersd): Pass |are_secure_codecs_required| along and use it to
136 // configure the CDM security level and use of secure surfaces on Android. 138 // configure the CDM security level and use of secure surfaces on Android.
137 request.requestSucceeded(WebContentDecryptionModuleAccessImpl::Create( 139 request.requestSucceeded(WebContentDecryptionModuleAccessImpl::Create(
(...skipping 19 matching lines...) Expand all
157 std::string uma_name = GetKeySystemNameForUMA(key_system_ascii); 159 std::string uma_name = GetKeySystemNameForUMA(key_system_ascii);
158 Reporter* reporter = reporters_.get(uma_name); 160 Reporter* reporter = reporters_.get(uma_name);
159 if (!reporter) { 161 if (!reporter) {
160 reporter = new Reporter(uma_name); 162 reporter = new Reporter(uma_name);
161 reporters_.add(uma_name, make_scoped_ptr(reporter)); 163 reporters_.add(uma_name, make_scoped_ptr(reporter));
162 } 164 }
163 return reporter; 165 return reporter;
164 } 166 }
165 167
166 } // namespace media 168 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webcontentdecryptionmoduleaccess_impl.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698