OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ | 5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ |
6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ | 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 std::vector<webkit::WebPluginInfo>* plugins); | 208 std::vector<webkit::WebPluginInfo>* plugins); |
209 | 209 |
210 // Returns true if the protocol implemented to serve |url| supports features | 210 // Returns true if the protocol implemented to serve |url| supports features |
211 // required by the media engine. | 211 // required by the media engine. |
212 bool IsProtocolSupportedForMedia(const GURL& url); | 212 bool IsProtocolSupportedForMedia(const GURL& url); |
213 | 213 |
214 // Returns the locale that this instance of webkit is running as. This is of | 214 // Returns the locale that this instance of webkit is running as. This is of |
215 // the form language-country (e.g., en-US or pt-BR). | 215 // the form language-country (e.g., en-US or pt-BR). |
216 std::string GetWebKitLocale(); | 216 std::string GetWebKitLocale(); |
217 | 217 |
218 // Close current connections. Used for debugging. | |
219 void CloseCurrentConnections(); | |
220 | |
221 // Enable or disable the disk cache. Used for debugging. | |
222 void SetCacheMode(bool enabled); | |
223 | |
224 // Clear the disk cache. Used for debugging. | |
225 // |preserve_ssl_host_info| indicates whether disk cache entries related to | |
226 // SSL information should be purged. | |
227 void ClearCache(bool preserve_ssl_host_info); | |
228 | |
229 // Clear the host resolver cache. Used for debugging. | |
230 void ClearHostResolverCache(); | |
231 | |
232 // Clear the predictor cache (for DNS prefetch and preconnect). Used for | |
233 // debugging. | |
234 void ClearPredictorCache(); | |
235 | |
236 // Returns true if the embedder is running in single process mode. | 218 // Returns true if the embedder is running in single process mode. |
237 bool IsSingleProcess(); | 219 bool IsSingleProcess(); |
238 | 220 |
239 // Enables/Disables Spdy for requests afterwards. Used for benchmarking. | |
240 void EnableSpdy(bool enable); | |
241 | |
242 #if defined(OS_LINUX) | 221 #if defined(OS_LINUX) |
243 // Return a read-only file descriptor to the font which best matches the given | 222 // Return a read-only file descriptor to the font which best matches the given |
244 // properties or -1 on failure. | 223 // properties or -1 on failure. |
245 // charset: specifies the language(s) that the font must cover. See | 224 // charset: specifies the language(s) that the font must cover. See |
246 // render_sandbox_host_linux.cc for more information. | 225 // render_sandbox_host_linux.cc for more information. |
247 int MatchFontWithFallback(const std::string& face, bool bold, | 226 int MatchFontWithFallback(const std::string& face, bool bold, |
248 bool italic, int charset); | 227 bool italic, int charset); |
249 | 228 |
250 // GetFontTable loads a specified font table from an open SFNT file. | 229 // GetFontTable loads a specified font table from an open SFNT file. |
251 // fd: a file descriptor to the SFNT file. The position doesn't matter. | 230 // fd: a file descriptor to the SFNT file. The position doesn't matter. |
252 // table: the table in *big-endian* format, or 0 for the whole font file. | 231 // table: the table in *big-endian* format, or 0 for the whole font file. |
253 // output: a buffer of size output_length that gets the data. can be 0, in | 232 // output: a buffer of size output_length that gets the data. can be 0, in |
254 // which case output_length will be set to the required size in bytes. | 233 // which case output_length will be set to the required size in bytes. |
255 // output_length: size of output, if it's not 0. | 234 // output_length: size of output, if it's not 0. |
256 // | 235 // |
257 // returns: true on success. | 236 // returns: true on success. |
258 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 237 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
259 size_t* output_length); | 238 size_t* output_length); |
260 #endif | 239 #endif |
261 | 240 |
262 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- | 241 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- |
263 | 242 |
264 | 243 |
265 } // namespace webkit_glue | 244 } // namespace webkit_glue |
266 | 245 |
267 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 246 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
OLD | NEW |