Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1700)

Unified Diff: chrome/renderer/renderer_webkitclient_impl.h

Issue 132007: Linux: plumb fontconfig call out to the sandbox host. (Closed)
Patch Set: ... Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/renderer_sandbox_support_linux.cc ('k') | chrome/renderer/renderer_webkitclient_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/renderer_webkitclient_impl.h
diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h
index 3150b129302e182f41760c9c5351c0080ce69d78..27d11f8f6bdd8fce75ce50815c2988dd074fcb2e 100644
--- a/chrome/renderer/renderer_webkitclient_impl.h
+++ b/chrome/renderer/renderer_webkitclient_impl.h
@@ -11,6 +11,11 @@
#if defined(OS_WIN)
#include "webkit/api/public/win/WebSandboxSupport.h"
+#elif defined(OS_LINUX)
+#include <string>
+#include <map>
+#include "base/lock.h"
+#include "webkit/api/public/linux/WebSandboxSupport.h"
#endif
class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl {
@@ -45,12 +50,26 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl {
public:
virtual bool ensureFontLoaded(HFONT);
};
+#elif defined(OS_LINUX)
+ class SandboxSupport : public WebKit::WebSandboxSupport {
+ public:
+ virtual WebKit::WebString getFontFamilyForCharacters(
+ const WebKit::WebUChar* characters, size_t numCharacters);
+
+ private:
+ // WebKit likes to ask us for the correct font family to use for a set of
+ // unicode code points. It needs this information frequently so we cache it
+ // here. The key in this map is an array of 16-bit UTF16 values from WebKit.
+ // The value is a string containing the correct font family.
+ Lock unicode_font_families_mutex_;
+ std::map<std::string, std::string> unicode_font_families_;
+ };
#endif
webkit_glue::WebClipboardImpl clipboard_;
MimeRegistry mime_registry_;
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
SandboxSupport sandbox_support_;
#endif
};
« no previous file with comments | « chrome/renderer/renderer_sandbox_support_linux.cc ('k') | chrome/renderer/renderer_webkitclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698