blob: 2efdf661e698f614ad507b588a64d2d273e1aca1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// 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/webclipboard_impl.h"
#include "webkit/glue/webkitclient_impl.h"
#if defined(OS_WIN)
#include "third_party/WebKit/WebKit/chromium/public/win/WebSandboxSupport.h"
#endif
class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl {
public:
// WebKitClient methods:
virtual WebKit::WebClipboard* clipboard();
virtual WebKit::WebMimeRegistry* mimeRegistry();
virtual WebKit::WebSandboxSupport* sandboxSupport();
virtual uint64_t visitedLinkHash(const char* canonicalURL, size_t length);
virtual bool isLinkVisited(uint64_t linkHash);
virtual void setCookies(
const WebKit::WebURL& url, const WebKit::WebURL& policy_url,
const WebKit::WebString&);
virtual WebKit::WebString cookies(
const WebKit::WebURL& url, const WebKit::WebURL& policy_url);
virtual void prefetchHostName(const WebKit::WebString&);
virtual WebKit::WebString defaultLocale();
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&);
};
#if defined(OS_WIN)
class SandboxSupport : public WebKit::WebSandboxSupport {
public:
virtual bool ensureFontLoaded(HFONT);
};
#endif
webkit_glue::WebClipboardImpl clipboard_;
MimeRegistry mime_registry_;
#if defined(OS_WIN)
SandboxSupport sandbox_support_;
#endif
};
#endif // CHROME_RENDERER_WEBKIT_CLIENT_IMPL_H_
|