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 #include "content/renderer/media/crypto/key_systems.h" | 5 #include "content/renderer/media/crypto/key_systems.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 bool use_aes_decryptor, | 118 bool use_aes_decryptor, |
119 #if defined(ENABLE_PEPPER_CDMS) | 119 #if defined(ENABLE_PEPPER_CDMS) |
120 const std::string& pepper_type, | 120 const std::string& pepper_type, |
121 #endif | 121 #endif |
122 SupportedCodecs supported_codecs, | 122 SupportedCodecs supported_codecs, |
123 const std::string& parent_key_system); | 123 const std::string& parent_key_system); |
124 | 124 |
125 friend struct base::DefaultLazyInstanceTraits<KeySystems>; | 125 friend struct base::DefaultLazyInstanceTraits<KeySystems>; |
126 | 126 |
127 struct KeySystemProperties { | 127 struct KeySystemProperties { |
128 KeySystemProperties() : use_aes_decryptor(false) {} | 128 KeySystemProperties() |
| 129 : use_aes_decryptor(false), supported_codecs(EME_CODEC_NONE) {} |
129 | 130 |
130 bool use_aes_decryptor; | 131 bool use_aes_decryptor; |
131 #if defined(ENABLE_PEPPER_CDMS) | 132 #if defined(ENABLE_PEPPER_CDMS) |
132 std::string pepper_type; | 133 std::string pepper_type; |
133 #endif | 134 #endif |
134 SupportedCodecs supported_codecs; | 135 SupportedCodecs supported_codecs; |
135 }; | 136 }; |
136 | 137 |
137 typedef base::hash_map<std::string, KeySystemProperties> | 138 typedef base::hash_map<std::string, KeySystemProperties> |
138 KeySystemPropertiesMap; | 139 KeySystemPropertiesMap; |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 CONTENT_EXPORT void AddContainerMask(const std::string& container, | 525 CONTENT_EXPORT void AddContainerMask(const std::string& container, |
525 uint32 mask) { | 526 uint32 mask) { |
526 KeySystems::GetInstance().AddContainerMask(container, mask); | 527 KeySystems::GetInstance().AddContainerMask(container, mask); |
527 } | 528 } |
528 | 529 |
529 CONTENT_EXPORT void AddCodecMask(const std::string& codec, uint32 mask) { | 530 CONTENT_EXPORT void AddCodecMask(const std::string& codec, uint32 mask) { |
530 KeySystems::GetInstance().AddCodecMask(codec, mask); | 531 KeySystems::GetInstance().AddCodecMask(codec, mask); |
531 } | 532 } |
532 | 533 |
533 } // namespace content | 534 } // namespace content |
OLD | NEW |