| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/child/simple_webmimeregistry_impl.h" | 5 #include "content/child/simple_webmimeregistry_impl.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const WebString& mime_type) { | 56 const WebString& mime_type) { |
| 57 return mime_util::IsSupportedJavascriptMimeType(ToASCIIOrEmpty(mime_type)) | 57 return mime_util::IsSupportedJavascriptMimeType(ToASCIIOrEmpty(mime_type)) |
| 58 ? WebMimeRegistry::IsSupported | 58 ? WebMimeRegistry::IsSupported |
| 59 : WebMimeRegistry::IsNotSupported; | 59 : WebMimeRegistry::IsNotSupported; |
| 60 } | 60 } |
| 61 | 61 |
| 62 // When debugging layout tests failures in the test shell, | 62 // When debugging layout tests failures in the test shell, |
| 63 // see TestShellWebMimeRegistryImpl. | 63 // see TestShellWebMimeRegistryImpl. |
| 64 WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType( | 64 WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType( |
| 65 const WebString& mime_type, | 65 const WebString& mime_type, |
| 66 const WebString& codecs, | 66 const WebString& codecs) { |
| 67 const WebString& key_system) { | |
| 68 // Media features are only supported at the content/renderer/ layer. | 67 // Media features are only supported at the content/renderer/ layer. |
| 69 return IsNotSupported; | 68 return IsNotSupported; |
| 70 } | 69 } |
| 71 | 70 |
| 72 bool SimpleWebMimeRegistryImpl::supportsMediaSourceMIMEType( | 71 bool SimpleWebMimeRegistryImpl::supportsMediaSourceMIMEType( |
| 73 const WebString& mime_type, | 72 const WebString& mime_type, |
| 74 const WebString& codecs) { | 73 const WebString& codecs) { |
| 75 // Media features are only supported at the content/renderer layer. | 74 // Media features are only supported at the content/renderer layer. |
| 76 return false; | 75 return false; |
| 77 } | 76 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 94 | 93 |
| 95 WebString SimpleWebMimeRegistryImpl::wellKnownMimeTypeForExtension( | 94 WebString SimpleWebMimeRegistryImpl::wellKnownMimeTypeForExtension( |
| 96 const WebString& file_extension) { | 95 const WebString& file_extension) { |
| 97 std::string mime_type; | 96 std::string mime_type; |
| 98 net::GetWellKnownMimeTypeFromExtension( | 97 net::GetWellKnownMimeTypeFromExtension( |
| 99 blink::WebStringToFilePath(file_extension).value(), &mime_type); | 98 blink::WebStringToFilePath(file_extension).value(), &mime_type); |
| 100 return WebString::fromUTF8(mime_type); | 99 return WebString::fromUTF8(mime_type); |
| 101 } | 100 } |
| 102 | 101 |
| 103 } // namespace content | 102 } // namespace content |
| OLD | NEW |