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

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

Issue 2707393002: Revert "EME: Fail requestMediaKeySystemAccess if no capabilities specified"
Patch Set: Created 3 years, 10 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/UseCounter.h ('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 <algorithm> 7 #include <algorithm>
8 8
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 private: 117 private:
118 // Returns true if the ExecutionContext is valid, false otherwise. 118 // Returns true if the ExecutionContext is valid, false otherwise.
119 bool isExecutionContextValid() const; 119 bool isExecutionContextValid() const;
120 120
121 // For widevine key system, generate warning and report to UMA if 121 // For widevine key system, generate warning and report to UMA if
122 // |m_supportedConfigurations| contains any video capability with empty 122 // |m_supportedConfigurations| contains any video capability with empty
123 // robustness string. 123 // robustness string.
124 void checkVideoCapabilityRobustness() const; 124 void checkVideoCapabilityRobustness() const;
125 125
126 // Log UseCounter if selected configuration does not have at least one of
127 // 'audioCapabilities' and 'videoCapabilities' non-empty.
128 // TODO(jrummell): Switch to deprecation message once we have data.
129 // See http://crbug.com/616233.
130 void checkCapabilities(const WebMediaKeySystemConfiguration&);
131
126 Member<ScriptPromiseResolver> m_resolver; 132 Member<ScriptPromiseResolver> m_resolver;
127 const String m_keySystem; 133 const String m_keySystem;
128 WebVector<WebMediaKeySystemConfiguration> m_supportedConfigurations; 134 WebVector<WebMediaKeySystemConfiguration> m_supportedConfigurations;
129 }; 135 };
130 136
131 MediaKeySystemAccessInitializer::MediaKeySystemAccessInitializer( 137 MediaKeySystemAccessInitializer::MediaKeySystemAccessInitializer(
132 ScriptState* scriptState, 138 ScriptState* scriptState,
133 const String& keySystem, 139 const String& keySystem,
134 const HeapVector<MediaKeySystemConfiguration>& supportedConfigurations) 140 const HeapVector<MediaKeySystemConfiguration>& supportedConfigurations)
135 : m_resolver(ScriptPromiseResolver::create(scriptState)), 141 : m_resolver(ScriptPromiseResolver::create(scriptState)),
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 WebEncryptedMediaClient* mediaClient = 331 WebEncryptedMediaClient* mediaClient =
326 controller->encryptedMediaClient(executionContext); 332 controller->encryptedMediaClient(executionContext);
327 mediaClient->requestMediaKeySystemAccess( 333 mediaClient->requestMediaKeySystemAccess(
328 WebEncryptedMediaRequest(initializer)); 334 WebEncryptedMediaRequest(initializer));
329 335
330 // 7. Return promise. 336 // 7. Return promise.
331 return promise; 337 return promise;
332 } 338 }
333 339
334 } // namespace blink 340 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698