OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/media/crypto/key_systems.h" | 7 #include "webkit/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" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "net/base/mime_util.h" | 12 #include "net/base/mime_util.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
15 | 15 |
16 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 16 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
17 | 17 |
18 namespace webkit_media { | 18 namespace webkit_media { |
19 | 19 |
20 // Convert a WebString to ASCII, falling back on an empty string in the case | 20 // Convert a WebString to ASCII, falling back on an empty string in the case |
21 // of a non-ASCII string. | 21 // of a non-ASCII string. |
22 static std::string ToASCIIOrEmpty(const WebKit::WebString& string) { | 22 static std::string ToASCIIOrEmpty(const WebKit::WebString& string) { |
23 return IsStringASCII(string) ? UTF16ToASCII(string) : std::string(); | 23 return IsStringASCII(string) ? UTF16ToASCII(string) : std::string(); |
24 } | 24 } |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 std::string GetPluginType(const std::string& key_system) { | 229 std::string GetPluginType(const std::string& key_system) { |
230 for (size_t i = 0; i < arraysize(kKeySystemToPluginTypeMapping); ++i) { | 230 for (size_t i = 0; i < arraysize(kKeySystemToPluginTypeMapping); ++i) { |
231 if (kKeySystemToPluginTypeMapping[i].key_system == key_system) | 231 if (kKeySystemToPluginTypeMapping[i].key_system == key_system) |
232 return kKeySystemToPluginTypeMapping[i].plugin_type; | 232 return kKeySystemToPluginTypeMapping[i].plugin_type; |
233 } | 233 } |
234 | 234 |
235 return std::string(); | 235 return std::string(); |
236 } | 236 } |
237 | 237 |
238 } // namespace webkit_media | 238 } // namespace webkit_media |
OLD | NEW |