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

Side by Side Diff: third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp

Issue 2528563005: Add deprecation messages for EME requestMediaKeySystemAccess features (Closed)
Patch Set: fix test (+rebase) 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h" 5 #include "modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h" 7 #include "bindings/core/v8/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/V8ThrowException.h" 10 #include "bindings/core/v8/V8ThrowException.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // This is only checking that at least one capability is provided in the 307 // This is only checking that at least one capability is provided in the
308 // selected configuration, as apps may pass empty capabilities for 308 // selected configuration, as apps may pass empty capabilities for
309 // compatibility with other implementations. 309 // compatibility with other implementations.
310 bool atLeastOneAudioCapability = config.audioCapabilities.size() > 0; 310 bool atLeastOneAudioCapability = config.audioCapabilities.size() > 0;
311 bool atLeastOneVideoCapability = config.videoCapabilities.size() > 0; 311 bool atLeastOneVideoCapability = config.videoCapabilities.size() > 0;
312 312
313 if (atLeastOneAudioCapability || atLeastOneVideoCapability) { 313 if (atLeastOneAudioCapability || atLeastOneVideoCapability) {
314 UseCounter::count(m_resolver->getExecutionContext(), 314 UseCounter::count(m_resolver->getExecutionContext(),
315 UseCounter::EncryptedMediaCapabilityProvided); 315 UseCounter::EncryptedMediaCapabilityProvided);
316 } else { 316 } else {
317 // TODO(jrummell): Switch to deprecation message once we understand 317 Deprecation::countDeprecation(
318 // current usage. http://crbug.com/616233. 318 m_resolver->getExecutionContext(),
319 UseCounter::count(m_resolver->getExecutionContext(), 319 UseCounter::EncryptedMediaCapabilityNotProvided);
320 UseCounter::EncryptedMediaCapabilityNotProvided);
321 } 320 }
322 } 321 }
323 322
324 } // namespace 323 } // namespace
325 324
326 ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess( 325 ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess(
327 ScriptState* scriptState, 326 ScriptState* scriptState,
328 Navigator& navigator, 327 Navigator& navigator,
329 const String& keySystem, 328 const String& keySystem,
330 const HeapVector<MediaKeySystemConfiguration>& supportedConfigurations) { 329 const HeapVector<MediaKeySystemConfiguration>& supportedConfigurations) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 WebEncryptedMediaClient* mediaClient = 388 WebEncryptedMediaClient* mediaClient =
390 controller->encryptedMediaClient(executionContext); 389 controller->encryptedMediaClient(executionContext);
391 mediaClient->requestMediaKeySystemAccess( 390 mediaClient->requestMediaKeySystemAccess(
392 WebEncryptedMediaRequest(initializer)); 391 WebEncryptedMediaRequest(initializer));
393 392
394 // 7. Return promise. 393 // 7. Return promise.
395 return promise; 394 return promise;
396 } 395 }
397 396
398 } // namespace blink 397 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698