summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/renderer_glue.cc8
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.cc26
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.h19
3 files changed, 40 insertions, 13 deletions
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index 117f625..3774d13 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -221,14 +221,6 @@ bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
new ViewHostMsg_GetPlugins(refresh, plugins));
}
-#if defined(OS_WIN)
-bool EnsureFontLoaded(HFONT font) {
- LOGFONT logfont;
- GetObject(font, sizeof(LOGFONT), &logfont);
- return RenderThread::current()->Send(new ViewHostMsg_LoadFont(logfont));
-}
-#endif
-
webkit_glue::ScreenInfo GetScreenInfo(gfx::NativeViewId window) {
webkit_glue::ScreenInfo results;
RenderThread::current()->Send(
diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc
index 9e34a7c..28d6f73 100644
--- a/chrome/renderer/renderer_webkitclient_impl.cc
+++ b/chrome/renderer/renderer_webkitclient_impl.cc
@@ -22,6 +22,18 @@ using WebKit::WebURL;
//------------------------------------------------------------------------------
+WebKit::WebMimeRegistry* RendererWebKitClientImpl::mimeRegistry() {
+ return &mime_registry_;
+}
+
+WebKit::WebSandboxSupport* RendererWebKitClientImpl::sandboxSupport() {
+#if defined(OS_WIN)
+ return &sandbox_support_;
+#else
+ return NULL;
+#endif
+}
+
uint64_t RendererWebKitClientImpl::visitedLinkHash(const char* canonical_url,
size_t length) {
return RenderThread::current()->visited_link_slave()->ComputeURLFingerprint(
@@ -32,8 +44,6 @@ bool RendererWebKitClientImpl::isLinkVisited(uint64_t link_hash) {
return RenderThread::current()->visited_link_slave()->IsVisited(link_hash);
}
-//------------------------------------------------------------------------------
-
void RendererWebKitClientImpl::setCookies(
const WebURL& url, const WebURL& policy_url, const WebString& value) {
std::string value_utf8;
@@ -107,3 +117,15 @@ WebString RendererWebKitClientImpl::MimeRegistry::preferredExtensionForMIMEType(
&file_extension));
return webkit_glue::FilePathStringToWebString(file_extension);
}
+
+//------------------------------------------------------------------------------
+
+#if defined(OS_WIN)
+
+bool RendererWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) {
+ LOGFONT logfont;
+ GetObject(font, sizeof(LOGFONT), &logfont);
+ return RenderThread::current()->Send(new ViewHostMsg_LoadFont(logfont));
+}
+
+#endif
diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h
index 2ed397b..5eada2a 100644
--- a/chrome/renderer/renderer_webkitclient_impl.h
+++ b/chrome/renderer/renderer_webkitclient_impl.h
@@ -8,12 +8,15 @@
#include "webkit/glue/simple_webmimeregistry_impl.h"
#include "webkit/glue/webkitclient_impl.h"
+#if defined(OS_WIN)
+#include "WebSandboxSupport.h"
+#endif
+
class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl {
public:
// WebKitClient methods:
- virtual WebKit::WebMimeRegistry* mimeRegistry() {
- return &mime_registry_;
- }
+ 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(
@@ -33,7 +36,17 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl {
const WebKit::WebString&);
};
+#if defined(OS_WIN)
+ class SandboxSupport : public WebKit::WebSandboxSupport {
+ public:
+ virtual bool ensureFontLoaded(HFONT);
+ };
+#endif
+
MimeRegistry mime_registry_;
+#if defined(OS_WIN)
+ SandboxSupport sandbox_support_;
+#endif
};
#endif // CHROME_RENDERER_WEBKIT_CLIENT_IMPL_H_