OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_CHILD_SIMPLE_WEBMIMEREGISTRY_IMPL_H_ | |
6 #define CONTENT_CHILD_SIMPLE_WEBMIMEREGISTRY_IMPL_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/compiler_specific.h" | |
11 #include "content/common/content_export.h" | |
12 #include "third_party/WebKit/public/platform/WebMimeRegistry.h" | |
13 | |
14 namespace content { | |
15 | |
16 class CONTENT_EXPORT SimpleWebMimeRegistryImpl : | |
17 NON_EXPORTED_BASE(public blink::WebMimeRegistry) { | |
18 public: | |
19 SimpleWebMimeRegistryImpl() {} | |
20 virtual ~SimpleWebMimeRegistryImpl() {} | |
21 | |
22 // Convert a WebString to ASCII, falling back on an empty string in the case | |
23 // of a non-ASCII string. | |
24 static std::string ToASCIIOrEmpty(const blink::WebString& string); | |
25 | |
26 // WebMimeRegistry methods: | |
27 blink::WebMimeRegistry::SupportsType supportsMIMEType( | |
28 const blink::WebString&) override; | |
29 blink::WebMimeRegistry::SupportsType supportsImageMIMEType( | |
30 const blink::WebString&) override; | |
31 blink::WebMimeRegistry::SupportsType supportsImagePrefixedMIMEType( | |
32 const blink::WebString&) override; | |
33 blink::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( | |
34 const blink::WebString&) override; | |
35 blink::WebMimeRegistry::SupportsType supportsMediaMIMEType( | |
36 const blink::WebString&, | |
37 const blink::WebString&) override; | |
38 bool supportsMediaSourceMIMEType(const blink::WebString&, | |
39 const blink::WebString&) override; | |
40 blink::WebMimeRegistry::SupportsType supportsNonImageMIMEType( | |
41 const blink::WebString&) override; | |
42 blink::WebString mimeTypeForExtension(const blink::WebString&) override; | |
43 blink::WebString wellKnownMimeTypeForExtension( | |
44 const blink::WebString&) override; | |
45 }; | |
46 | |
47 } // namespace content | |
48 | |
49 #endif // CONTENT_CHILD_SIMPLE_WEBMIMEREGISTRY_IMPL_H_ | |
OLD | NEW |