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

Side by Side Diff: webkit/api/src/ChromiumBridge.cpp

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
« no previous file with comments | « webkit/api/public/linux/WebSandboxSupport.h ('k') | webkit/api/src/gtk/WebFontInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "WebPluginListBuilderImpl.h" 42 #include "WebPluginListBuilderImpl.h"
43 #include "WebString.h" 43 #include "WebString.h"
44 #include "WebURL.h" 44 #include "WebURL.h"
45 45
46 #if PLATFORM(WIN_OS) 46 #if PLATFORM(WIN_OS)
47 #include "WebRect.h" 47 #include "WebRect.h"
48 #include "WebSandboxSupport.h" 48 #include "WebSandboxSupport.h"
49 #include "WebThemeEngine.h" 49 #include "WebThemeEngine.h"
50 #endif 50 #endif
51 51
52 #if PLATFORM(LINUX)
53 #include "WebSandboxSupport.h"
54 #include "WebFontInfo.h"
55 #endif
56
52 #include "BitmapImage.h" 57 #include "BitmapImage.h"
53 #include "GraphicsContext.h" 58 #include "GraphicsContext.h"
54 #include "KURL.h" 59 #include "KURL.h"
55 #include "NativeImageSkia.h" 60 #include "NativeImageSkia.h"
56 #include "NotImplemented.h" 61 #include "NotImplemented.h"
57 #include "PlatformContextSkia.h" 62 #include "PlatformContextSkia.h"
58 #include "PluginData.h" 63 #include "PluginData.h"
59 #include <wtf/Assertions.h> 64 #include <wtf/Assertions.h>
60 65
61 // We are part of the WebKit implementation. 66 // We are part of the WebKit implementation.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 143
139 // DNS ------------------------------------------------------------------------ 144 // DNS ------------------------------------------------------------------------
140 145
141 void ChromiumBridge::prefetchDNS(const String& hostname) 146 void ChromiumBridge::prefetchDNS(const String& hostname)
142 { 147 {
143 webKitClient()->prefetchHostName(hostname); 148 webKitClient()->prefetchHostName(hostname);
144 } 149 }
145 150
146 // Font ----------------------------------------------------------------------- 151 // Font -----------------------------------------------------------------------
147 152
148 #if defined(OS_WIN) 153 #if PLATFORM(WIN_OS)
149 bool ChromiumBridge::ensureFontLoaded(HFONT font) 154 bool ChromiumBridge::ensureFontLoaded(HFONT font)
150 { 155 {
151 WebSandboxSupport* ss = webKitClient()->sandboxSupport(); 156 WebSandboxSupport* ss = webKitClient()->sandboxSupport();
152 157
153 // if there is no sandbox, then we can assume the font 158 // if there is no sandbox, then we can assume the font
154 // was able to be loaded successfully already 159 // was able to be loaded successfully already
155 return ss ? ss->ensureFontLoaded(font) : true; 160 return ss ? ss->ensureFontLoaded(font) : true;
156 } 161 }
157 #endif 162 #endif
158 163
164 #if PLATFORM(LINUX)
165 String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters)
166 {
167 if (webKitClient()->sandboxSupport())
168 return webKitClient()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters);
169 else
170 return WebFontInfo::familyForChars(characters, numCharacters);
171 }
172 #endif
173
159 // Language ------------------------------------------------------------------- 174 // Language -------------------------------------------------------------------
160 175
161 String ChromiumBridge::computedDefaultLanguage() 176 String ChromiumBridge::computedDefaultLanguage()
162 { 177 {
163 return webKitClient()->defaultLocale(); 178 return webKitClient()->defaultLocale();
164 } 179 }
165 180
166 // LayoutTestMode ------------------------------------------------------------- 181 // LayoutTestMode -------------------------------------------------------------
167 182
168 bool ChromiumBridge::layoutTestMode() 183 bool ChromiumBridge::layoutTestMode()
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 407
393 return webKitClient()->visitedLinkHash(buffer.data(), buffer.length()); 408 return webKitClient()->visitedLinkHash(buffer.data(), buffer.length());
394 } 409 }
395 410
396 bool ChromiumBridge::isLinkVisited(WebCore::LinkHash visitedLinkHash) 411 bool ChromiumBridge::isLinkVisited(WebCore::LinkHash visitedLinkHash)
397 { 412 {
398 return webKitClient()->isLinkVisited(visitedLinkHash); 413 return webKitClient()->isLinkVisited(visitedLinkHash);
399 } 414 }
400 415
401 } // namespace WebCore 416 } // namespace WebCore
OLDNEW
« no previous file with comments | « webkit/api/public/linux/WebSandboxSupport.h ('k') | webkit/api/src/gtk/WebFontInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698