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

Side by Side Diff: media/base/key_systems.h

Issue 923283002: Implement checks for distinctiveIdentifier and persistentState in requestMediaKeySystemAccess(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile. Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_BASE_KEY_SYSTEMS_H_ 5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_
6 #define MEDIA_BASE_KEY_SYSTEMS_H_ 6 #define MEDIA_BASE_KEY_SYSTEMS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/eme_constants.h"
12 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
13 14
14 namespace media { 15 namespace media {
15 16
16 // Prefixed EME API only supports prefixed (webkit-) key system name for 17 // Prefixed EME API only supports prefixed (webkit-) key system name for
17 // certain key systems. But internally only unprefixed key systems are 18 // certain key systems. But internally only unprefixed key systems are
18 // supported. The following two functions help convert between prefixed and 19 // supported. The following two functions help convert between prefixed and
19 // unprefixed key system names. 20 // unprefixed key system names.
20 21
21 // Gets the unprefixed key system name for |key_system|. 22 // Gets the unprefixed key system name for |key_system|.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Returns whether AesDecryptor can be used for the given |concrete_key_system|. 78 // Returns whether AesDecryptor can be used for the given |concrete_key_system|.
78 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); 79 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system);
79 80
80 #if defined(ENABLE_PEPPER_CDMS) 81 #if defined(ENABLE_PEPPER_CDMS)
81 // Returns the Pepper MIME type for |concrete_key_system|. 82 // Returns the Pepper MIME type for |concrete_key_system|.
82 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based. 83 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based.
83 MEDIA_EXPORT std::string GetPepperType( 84 MEDIA_EXPORT std::string GetPepperType(
84 const std::string& concrete_key_system); 85 const std::string& concrete_key_system);
85 #endif 86 #endif
86 87
88 // Returns whether |key_system| supports persistent-license sessions.
89 MEDIA_EXPORT bool IsPersistentLicenseSessionSupported(
90 const std::string& key_system,
91 bool is_permission_granted);
92
93 // Returns whether |key_system| supports persistent-release-message sessions.
94 MEDIA_EXPORT bool IsPersistentReleaseMessageSessionSupported(
95 const std::string& key_system,
96 bool is_permission_granted);
97
98 // Returns whether |key_system| supports persistent state as requested.
99 MEDIA_EXPORT bool IsPersistentStateRequirementSupported(
100 const std::string& key_system,
101 EmeFeatureRequirement requirement,
102 bool is_permission_granted);
103
104 // Returns whether |key_system| supports distinctive identifiers as requested.
105 MEDIA_EXPORT bool IsDistinctiveIdentifierRequirementSupported(
106 const std::string& key_system,
107 EmeFeatureRequirement requirement,
108 bool is_permission_granted);
109
87 #if defined(UNIT_TEST) 110 #if defined(UNIT_TEST)
88 // Helper functions to add container/codec types for testing purposes. 111 // Helper functions to add container/codec types for testing purposes.
89 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); 112 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask);
90 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask); 113 MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask);
91 #endif // defined(UNIT_TEST) 114 #endif // defined(UNIT_TEST)
92 115
93 } // namespace media 116 } // namespace media
94 117
95 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ 118 #endif // MEDIA_BASE_KEY_SYSTEMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698