Revert of Roll src/third_party/WebKit e0eac24:489c548 (svn 193311:193320) (patchset...
[chromium-blink-merge.git] / media / cdm / key_system_names.h
blob94c84da1406a63520053cb816933eeff2cd1c655
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_CDM_KEY_SYSTEM_NAMES_H_
6 #define MEDIA_CDM_KEY_SYSTEM_NAMES_H_
8 #include <string>
10 #include "media/base/media_export.h"
12 namespace media {
14 // TODO(jrummell): Change other uses of Clear Key to use this common value.
16 // The key system name for Clear Key.
17 MEDIA_EXPORT extern const char kClearKey[];
19 // The key system name for External Clear Key.
20 MEDIA_EXPORT extern const char kExternalClearKey[];
22 // Returns true if |key_system| is Clear Key, false otherwise.
23 MEDIA_EXPORT inline bool IsClearKey(const std::string& key_system) {
24 return key_system == kClearKey;
27 // Returns true if |key_system| is (reverse) sub-domain of |parent_key_system|.
28 MEDIA_EXPORT bool IsParentKeySystemOf(const std::string& parent_key_system,
29 const std::string& key_system);
31 // Returns true if |key_system| is External Clear Key, false otherwise.
32 MEDIA_EXPORT bool IsExternalClearKey(const std::string& key_system);
34 } // namespace media
36 #endif // MEDIA_CDM_KEY_SYSTEM_NAMES_H_