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

Side by Side Diff: third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h

Issue 2349813002: EME: Update MediaKeySystemConfiguration defaults; require non-empty capabilities (Closed)
Patch Set: changes Created 4 years, 3 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 #ifndef WebMediaKeySystemConfiguration_h 5 #ifndef WebMediaKeySystemConfiguration_h
6 #define WebMediaKeySystemConfiguration_h 6 #define WebMediaKeySystemConfiguration_h
7 7
8 #include "public/platform/WebEncryptedMediaTypes.h" 8 #include "public/platform/WebEncryptedMediaTypes.h"
9 #include "public/platform/WebMediaKeySystemMediaCapability.h" 9 #include "public/platform/WebMediaKeySystemMediaCapability.h"
10 #include "public/platform/WebVector.h" 10 #include "public/platform/WebVector.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 struct WebMediaKeySystemConfiguration { 14 struct WebMediaKeySystemConfiguration {
15 enum class Requirement { 15 enum class Requirement {
16 Required, 16 Required,
17 Optional, 17 Optional,
18 NotAllowed, 18 NotAllowed,
19 }; 19 };
20 20
21 // As MediaKeySystemConfiguration is a dictionary, some members may be
22 // not-present. Because requestMediaKeySystemAccess() distinguishes empty
23 // from not-present, we require a presence flag for each member.
24 bool hasInitDataTypes = false;
25 WebVector<WebEncryptedMediaInitDataType> initDataTypes; 21 WebVector<WebEncryptedMediaInitDataType> initDataTypes;
26
27 bool hasAudioCapabilities = false;
28 WebVector<WebMediaKeySystemMediaCapability> audioCapabilities; 22 WebVector<WebMediaKeySystemMediaCapability> audioCapabilities;
29
30 bool hasVideoCapabilities = false;
31 WebVector<WebMediaKeySystemMediaCapability> videoCapabilities; 23 WebVector<WebMediaKeySystemMediaCapability> videoCapabilities;
32
33 // |distinctiveIdentifier| and |persistentState| are always present because
34 // they have default values.
35 Requirement distinctiveIdentifier = Requirement::Optional; 24 Requirement distinctiveIdentifier = Requirement::Optional;
36 Requirement persistentState = Requirement::Optional; 25 Requirement persistentState = Requirement::Optional;
37 26
27 // As |sessionTypes| is optional, we require a presence flag for it.
foolip 2016/09/23 08:18:39 To be pendantic, all of the above are also optiona
jrummell 2016/09/29 20:40:02 Done.
38 bool hasSessionTypes = false; 28 bool hasSessionTypes = false;
39 WebVector<WebEncryptedMediaSessionType> sessionTypes; 29 WebVector<WebEncryptedMediaSessionType> sessionTypes;
40 30
41 // |label| may be not-present, but we use a null string to represent that. 31 // |label| may be not-present, but we use a null string to represent that.
foolip 2016/09/23 08:18:39 It now has a default.
jrummell 2016/09/29 20:40:02 Done.
42 WebString label; 32 WebString label;
43 }; 33 };
44 34
45 } // namespace blink 35 } // namespace blink
46 36
47 #endif // WebMediaKeySystemConfiguration_h 37 #endif // WebMediaKeySystemConfiguration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698