diff options
Diffstat (limited to 'chrome/renderer/renderer_webkitclient_impl.h')
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h new file mode 100644 index 0000000..2e85234 --- /dev/null +++ b/chrome/renderer/renderer_webkitclient_impl.h @@ -0,0 +1,30 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this +// source code is governed by a BSD-style license that can be found in the +// LICENSE file. + +#ifndef CHROME_RENDERER_RENDERER_WEBKIT_CLIENT_IMPL_H_ +#define CHROME_RENDERER_RENDERER_WEBKIT_CLIENT_IMPL_H_ + +#include "webkit/glue/simple_webmimeregistry_impl.h" +#include "webkit/glue/webkitclient_impl.h" + +class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { + public: + // WebKitClient methods: + virtual WebKit::WebMimeRegistry* mimeRegistry() { + return &mime_registry_; + } + + private: + class MimeRegistry : public webkit_glue::SimpleWebMimeRegistryImpl { + public: + virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); + virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); + virtual WebKit::WebString preferredExtensionForMIMEType( + const WebKit::WebString&); + }; + + MimeRegistry mime_registry_; +}; + +#endif // CHROME_RENDERER_WEBKIT_CLIENT_IMPL_H_ |