OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "webkit/glue/simple_webmimeregistry_impl.h" | 5 #include "webkit/glue/simple_webmimeregistry_impl.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "net/base/mime_util.h" | 9 #include "net/base/mime_util.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
11 #include "webkit/glue/glue_util.h" | 11 #include "webkit/glue/glue_util.h" |
| 12 #include "webkit/glue/webkit_glue.h" |
12 | 13 |
13 using WebKit::WebString; | 14 using WebKit::WebString; |
14 | 15 |
15 namespace webkit_glue { | 16 namespace webkit_glue { |
16 | 17 |
17 bool SimpleWebMimeRegistryImpl::supportsImageMIMEType( | 18 bool SimpleWebMimeRegistryImpl::supportsImageMIMEType( |
18 const WebString& mime_type) { | 19 const WebString& mime_type) { |
19 return net::IsSupportedImageMimeType(UTF16ToASCII(mime_type).c_str()); | 20 return net::IsSupportedImageMimeType(UTF16ToASCII(mime_type).c_str()); |
20 } | 21 } |
21 | 22 |
(...skipping 25 matching lines...) Expand all Loading... |
47 | 48 |
48 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( | 49 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( |
49 const WebString& mime_type) { | 50 const WebString& mime_type) { |
50 FilePath::StringType file_extension; | 51 FilePath::StringType file_extension; |
51 net::GetPreferredExtensionForMimeType(UTF16ToASCII(mime_type), | 52 net::GetPreferredExtensionForMimeType(UTF16ToASCII(mime_type), |
52 &file_extension); | 53 &file_extension); |
53 return FilePathStringToWebString(file_extension); | 54 return FilePathStringToWebString(file_extension); |
54 } | 55 } |
55 | 56 |
56 } // namespace webkit_glue | 57 } // namespace webkit_glue |
OLD | NEW |