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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_RENDERER_WEBKIT_CLIENT_IMPL_H_ 5 #ifndef CHROME_RENDERER_RENDERER_WEBKIT_CLIENT_IMPL_H_
6 #define CHROME_RENDERER_RENDERER_WEBKIT_CLIENT_IMPL_H_ 6 #define CHROME_RENDERER_RENDERER_WEBKIT_CLIENT_IMPL_H_
7 7
8 #include "webkit/glue/simple_webmimeregistry_impl.h" 8 #include "webkit/glue/simple_webmimeregistry_impl.h"
9 #include "webkit/glue/webclipboard_impl.h" 9 #include "webkit/glue/webclipboard_impl.h"
10 #include "webkit/glue/webkitclient_impl.h" 10 #include "webkit/glue/webkitclient_impl.h"
11 11
12 #if defined(OS_WIN) 12 #if defined(OS_WIN)
13 #include "webkit/api/public/win/WebSandboxSupport.h" 13 #include "webkit/api/public/win/WebSandboxSupport.h"
14 #elif defined(OS_LINUX)
15 #include <string>
16 #include <map>
17 #include "base/lock.h"
18 #include "webkit/api/public/linux/WebSandboxSupport.h"
14 #endif 19 #endif
15 20
16 class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { 21 class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl {
17 public: 22 public:
18 // WebKitClient methods: 23 // WebKitClient methods:
19 virtual WebKit::WebClipboard* clipboard(); 24 virtual WebKit::WebClipboard* clipboard();
20 virtual WebKit::WebMimeRegistry* mimeRegistry(); 25 virtual WebKit::WebMimeRegistry* mimeRegistry();
21 virtual WebKit::WebSandboxSupport* sandboxSupport(); 26 virtual WebKit::WebSandboxSupport* sandboxSupport();
22 virtual unsigned long long visitedLinkHash( 27 virtual unsigned long long visitedLinkHash(
23 const char* canonicalURL, size_t length); 28 const char* canonicalURL, size_t length);
(...skipping 14 matching lines...) Expand all
38 virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); 43 virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&);
39 virtual WebKit::WebString preferredExtensionForMIMEType( 44 virtual WebKit::WebString preferredExtensionForMIMEType(
40 const WebKit::WebString&); 45 const WebKit::WebString&);
41 }; 46 };
42 47
43 #if defined(OS_WIN) 48 #if defined(OS_WIN)
44 class SandboxSupport : public WebKit::WebSandboxSupport { 49 class SandboxSupport : public WebKit::WebSandboxSupport {
45 public: 50 public:
46 virtual bool ensureFontLoaded(HFONT); 51 virtual bool ensureFontLoaded(HFONT);
47 }; 52 };
53 #elif defined(OS_LINUX)
54 class SandboxSupport : public WebKit::WebSandboxSupport {
55 public:
56 virtual WebKit::WebString getFontFamilyForCharacters(
57 const WebKit::WebUChar* characters, size_t numCharacters);
58
59 private:
60 // WebKit likes to ask us for the correct font family to use for a set of
61 // unicode code points. It needs this information frequently so we cache it
62 // here. The key in this map is an array of 16-bit UTF16 values from WebKit.
63 // The value is a string containing the correct font family.
64 Lock unicode_font_families_mutex_;
65 std::map<std::string, std::string> unicode_font_families_;
66 };
48 #endif 67 #endif
49 68
50 webkit_glue::WebClipboardImpl clipboard_; 69 webkit_glue::WebClipboardImpl clipboard_;
51 70
52 MimeRegistry mime_registry_; 71 MimeRegistry mime_registry_;
53 #if defined(OS_WIN) 72 #if defined(OS_WIN) || defined(OS_LINUX)
54 SandboxSupport sandbox_support_; 73 SandboxSupport sandbox_support_;
55 #endif 74 #endif
56 }; 75 };
57 76
58 #endif // CHROME_RENDERER_WEBKIT_CLIENT_IMPL_H_ 77 #endif // CHROME_RENDERER_WEBKIT_CLIENT_IMPL_H_
OLDNEW
« 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