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 // This file provides the embedder's side of random webkit glue functions. | 5 // This file provides the embedder's side of random webkit glue functions. |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 // static factory function | 219 // static factory function |
220 WebSocketStreamHandleBridge* WebSocketStreamHandleBridge::Create( | 220 WebSocketStreamHandleBridge* WebSocketStreamHandleBridge::Create( |
221 WebKit::WebSocketStreamHandle* handle, | 221 WebKit::WebSocketStreamHandle* handle, |
222 WebSocketStreamHandleDelegate* delegate) { | 222 WebSocketStreamHandleDelegate* delegate) { |
223 SocketStreamDispatcher* dispatcher = | 223 SocketStreamDispatcher* dispatcher = |
224 ChildThread::current()->socket_stream_dispatcher(); | 224 ChildThread::current()->socket_stream_dispatcher(); |
225 return dispatcher->CreateBridge(handle, delegate); | 225 return dispatcher->CreateBridge(handle, delegate); |
226 } | 226 } |
227 | 227 |
228 void CloseCurrentConnections() { | |
229 RenderThread::current()->CloseCurrentConnections(); | |
230 } | |
231 | |
232 void SetCacheMode(bool enabled) { | |
233 RenderThread::current()->SetCacheMode(enabled); | |
234 } | |
235 | |
236 void ClearCache(bool preserve_ssl_host_info) { | |
237 RenderThread::current()->ClearCache(preserve_ssl_host_info); | |
238 } | |
239 | |
240 void ClearHostResolverCache() { | |
241 RenderThread::current()->ClearHostResolverCache(); | |
242 } | |
243 | |
244 void ClearPredictorCache() { | |
245 RenderThread::current()->ClearPredictorCache(); | |
246 } | |
247 | |
248 bool IsSingleProcess() { | 228 bool IsSingleProcess() { |
249 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); | 229 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); |
250 } | 230 } |
251 | 231 |
252 void EnableSpdy(bool enable) { | |
253 RenderThread::current()->EnableSpdy(enable); | |
254 } | |
255 | |
256 #if defined(OS_LINUX) | 232 #if defined(OS_LINUX) |
257 int MatchFontWithFallback(const std::string& face, bool bold, | 233 int MatchFontWithFallback(const std::string& face, bool bold, |
258 bool italic, int charset) { | 234 bool italic, int charset) { |
259 return child_process_sandbox_support::MatchFontWithFallback( | 235 return child_process_sandbox_support::MatchFontWithFallback( |
260 face, bold, italic, charset); | 236 face, bold, italic, charset); |
261 } | 237 } |
262 | 238 |
263 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 239 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
264 size_t* output_length) { | 240 size_t* output_length) { |
265 return child_process_sandbox_support::GetFontTable( | 241 return child_process_sandbox_support::GetFontTable( |
(...skipping 20 matching lines...) Expand all Loading... |
286 | 262 |
287 base::StringPiece GetDataResource(int resource_id) { | 263 base::StringPiece GetDataResource(int resource_id) { |
288 return content::GetContentClient()->GetDataResource(resource_id); | 264 return content::GetContentClient()->GetDataResource(resource_id); |
289 } | 265 } |
290 | 266 |
291 std::string BuildUserAgent(bool mimic_windows) { | 267 std::string BuildUserAgent(bool mimic_windows) { |
292 return content::GetContentClient()->GetUserAgent(mimic_windows); | 268 return content::GetContentClient()->GetUserAgent(mimic_windows); |
293 } | 269 } |
294 | 270 |
295 } // namespace webkit_glue | 271 } // namespace webkit_glue |
OLD | NEW |