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

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

Issue 2588153002: Merge "Add deprecation messages for EME requestMediaKeySystemAccess features" (Closed)
Patch Set: Created 3 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
« 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // This is only checking that at least one capability is provided in the 310 // This is only checking that at least one capability is provided in the
311 // selected configuration, as apps may pass empty capabilities for 311 // selected configuration, as apps may pass empty capabilities for
312 // compatibility with other implementations. 312 // compatibility with other implementations.
313 bool atLeastOneAudioCapability = config.audioCapabilities.size() > 0; 313 bool atLeastOneAudioCapability = config.audioCapabilities.size() > 0;
314 bool atLeastOneVideoCapability = config.videoCapabilities.size() > 0; 314 bool atLeastOneVideoCapability = config.videoCapabilities.size() > 0;
315 315
316 if (atLeastOneAudioCapability || atLeastOneVideoCapability) { 316 if (atLeastOneAudioCapability || atLeastOneVideoCapability) {
317 UseCounter::count(m_resolver->getExecutionContext(), 317 UseCounter::count(m_resolver->getExecutionContext(),
318 UseCounter::EncryptedMediaCapabilityProvided); 318 UseCounter::EncryptedMediaCapabilityProvided);
319 } else { 319 } else {
320 // TODO(jrummell): Switch to deprecation message once we understand 320 Deprecation::countDeprecation(
321 // current usage. http://crbug.com/616233. 321 m_resolver->getExecutionContext(),
322 UseCounter::count(m_resolver->getExecutionContext(), 322 UseCounter::EncryptedMediaCapabilityNotProvided);
323 UseCounter::EncryptedMediaCapabilityNotProvided);
324 } 323 }
325 } 324 }
326 325
327 } // namespace 326 } // namespace
328 327
329 ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess( 328 ScriptPromise NavigatorRequestMediaKeySystemAccess::requestMediaKeySystemAccess(
330 ScriptState* scriptState, 329 ScriptState* scriptState,
331 Navigator& navigator, 330 Navigator& navigator,
332 const String& keySystem, 331 const String& keySystem,
333 const HeapVector<MediaKeySystemConfiguration>& supportedConfigurations) { 332 const HeapVector<MediaKeySystemConfiguration>& supportedConfigurations) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 WebEncryptedMediaClient* mediaClient = 392 WebEncryptedMediaClient* mediaClient =
394 controller->encryptedMediaClient(executionContext); 393 controller->encryptedMediaClient(executionContext);
395 mediaClient->requestMediaKeySystemAccess( 394 mediaClient->requestMediaKeySystemAccess(
396 WebEncryptedMediaRequest(initializer)); 395 WebEncryptedMediaRequest(initializer));
397 396
398 // 7. Return promise. 397 // 7. Return promise.
399 return promise; 398 return promise;
400 } 399 }
401 400
402 } // namespace blink 401 } // 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