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 <map> | 5 #include <map> |
6 | 6 |
7 #include "webkit/renderer/media/crypto/key_systems.h" | 7 #include "webkit/renderer/media/crypto/key_systems.h" |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 std::string GetPepperType(const std::string& key_system) { | 153 std::string GetPepperType(const std::string& key_system) { |
154 for (int i = 0; i < kNumKeySystemToPepperTypeMapping; ++i) { | 154 for (int i = 0; i < kNumKeySystemToPepperTypeMapping; ++i) { |
155 if (kKeySystemToPepperTypeMapping[i].key_system == key_system) | 155 if (kKeySystemToPepperTypeMapping[i].key_system == key_system) |
156 return kKeySystemToPepperTypeMapping[i].type; | 156 return kKeySystemToPepperTypeMapping[i].type; |
157 } | 157 } |
158 | 158 |
159 return std::string(); | 159 return std::string(); |
160 } | 160 } |
161 #endif // defined(ENABLE_PEPPER_CDMS) | 161 #endif // defined(ENABLE_PEPPER_CDMS) |
162 | 162 |
| 163 #if defined(OS_ANDROID) |
| 164 std::vector<uint8> GetUUID(const std::string& key_system) { |
| 165 for (int i = 0; i < kNumKeySystemToUUIDMapping; ++i) { |
| 166 if (kKeySystemToUUIDMapping[i].key_system == key_system) |
| 167 return std::vector<uint8>(kKeySystemToUUIDMapping[i].uuid, |
| 168 kKeySystemToUUIDMapping[i].uuid + 16); |
| 169 } |
| 170 return std::vector<uint8>(); |
| 171 } |
| 172 #endif // defined(OS_ANDROID) |
| 173 |
163 } // namespace webkit_media | 174 } // namespace webkit_media |
OLD | NEW |