Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ | 6 #define CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 // be an abstract key system. | 28 // be an abstract key system. |
| 29 // As an example, "com.example" is the parent of "com.example.foo". | 29 // As an example, "com.example" is the parent of "com.example.foo". |
| 30 | 30 |
| 31 namespace content { | 31 namespace content { |
| 32 | 32 |
| 33 // Contains information about an EME key system as well as how to instantiate | 33 // Contains information about an EME key system as well as how to instantiate |
| 34 // the corresponding CDM. | 34 // the corresponding CDM. |
| 35 struct CONTENT_EXPORT KeySystemInfo { | 35 struct CONTENT_EXPORT KeySystemInfo { |
| 36 explicit KeySystemInfo(const std::string& key_system); | 36 explicit KeySystemInfo(const std::string& key_system); |
| 37 ~KeySystemInfo(); | 37 ~KeySystemInfo(); |
| 38 static KeySystemInfo Build(const char* key_system, | |
|
ddorwin
2014/04/28 18:47:45
This violates the Content API design:
http://www.c
ycheo (away)
2014/04/29 00:49:52
The content api design allows to have constructors
ddorwin
2014/04/29 00:53:12
If you were to put it in a constructor, then we ca
| |
| 39 bool has_parent, | |
| 40 const char* suffix, | |
| 41 #if defined(ENABLE_PEPPER_CDMS) | |
|
Tom Sepez
2014/04/28 18:21:52
nit: maybe just pass this as NULL in the !ENABLE_P
| |
| 42 const char* pepper_type, | |
| 43 #endif | |
| 44 SupportedCodecs supported_codecs); | |
| 38 | 45 |
| 39 std::string key_system; | 46 std::string key_system; |
| 40 | 47 |
| 41 // Specifies codecs supported by |key_system|. | 48 // Specifies codecs supported by |key_system|. |
| 42 SupportedCodecs supported_codecs; | 49 SupportedCodecs supported_codecs; |
| 43 | 50 |
| 44 // A hierarchical parent for |key_system|. This value can be used to check | 51 // A hierarchical parent for |key_system|. This value can be used to check |
| 45 // supported types but cannot be used to instantiate a MediaKeys object. | 52 // supported types but cannot be used to instantiate a MediaKeys object. |
| 46 // Only one parent key system is currently supported per concrete key system. | 53 // Only one parent key system is currently supported per concrete key system. |
| 47 std::string parent_key_system; | 54 std::string parent_key_system; |
| 48 | 55 |
| 49 // The following indicate how the corresponding CDM should be instantiated. | 56 // The following indicate how the corresponding CDM should be instantiated. |
| 50 bool use_aes_decryptor; | 57 bool use_aes_decryptor; |
| 51 #if defined(ENABLE_PEPPER_CDMS) | 58 #if defined(ENABLE_PEPPER_CDMS) |
| 52 std::string pepper_type; | 59 std::string pepper_type; |
| 53 #endif | 60 #endif |
| 54 }; | 61 }; |
| 55 | 62 |
| 56 } // namespace content | 63 } // namespace content |
| 57 | 64 |
| 58 #endif // CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ | 65 #endif // CONTENT_PUBLIC_RENDERER_KEY_SYSTEM_INFO_H_ |
| OLD | NEW |