| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 url.SchemeIs(chrome::kHttpsScheme) || | 230 url.SchemeIs(chrome::kHttpsScheme) || |
| 231 url.SchemeIs(chrome::kDataScheme) || | 231 url.SchemeIs(chrome::kDataScheme) || |
| 232 url.SchemeIs(chrome::kExtensionScheme)) | 232 url.SchemeIs(chrome::kExtensionScheme)) |
| 233 return true; | 233 return true; |
| 234 return false; | 234 return false; |
| 235 } | 235 } |
| 236 | 236 |
| 237 // static factory function | 237 // static factory function |
| 238 ResourceLoaderBridge* ResourceLoaderBridge::Create( | 238 ResourceLoaderBridge* ResourceLoaderBridge::Create( |
| 239 const ResourceLoaderBridge::RequestInfo& request_info) { | 239 const ResourceLoaderBridge::RequestInfo& request_info) { |
| 240 return ChildThread::current()->CreateBridge(request_info, -1, -1); | 240 return static_cast<ChildThread*>(ChildThread::current())-> |
| 241 CreateBridge(request_info, -1, -1); |
| 241 } | 242 } |
| 242 | 243 |
| 243 // static factory function | 244 // static factory function |
| 244 WebSocketStreamHandleBridge* WebSocketStreamHandleBridge::Create( | 245 WebSocketStreamHandleBridge* WebSocketStreamHandleBridge::Create( |
| 245 WebKit::WebSocketStreamHandle* handle, | 246 WebKit::WebSocketStreamHandle* handle, |
| 246 WebSocketStreamHandleDelegate* delegate) { | 247 WebSocketStreamHandleDelegate* delegate) { |
| 247 SocketStreamDispatcher* dispatcher = | 248 SocketStreamDispatcher* dispatcher = |
| 248 ChildThread::current()->socket_stream_dispatcher(); | 249 static_cast<ChildThread*>(ChildThread::current())-> |
| 250 socket_stream_dispatcher(); |
| 249 return dispatcher->CreateBridge(handle, delegate); | 251 return dispatcher->CreateBridge(handle, delegate); |
| 250 } | 252 } |
| 251 | 253 |
| 252 void NotifyCacheStats() { | 254 void NotifyCacheStats() { |
| 253 // Update the browser about our cache | 255 // Update the browser about our cache |
| 254 // NOTE: Since this can be called from the plugin process, we might not have | 256 // NOTE: Since this can be called from the plugin process, we might not have |
| 255 // a RenderThread. Do nothing in that case. | 257 // a RenderThread. Do nothing in that case. |
| 256 if (RenderThread::current()) | 258 if (RenderThread::current()) |
| 257 RenderThread::current()->InformHostOfCacheStatsLater(); | 259 RenderThread::current()->InformHostOfCacheStatsLater(); |
| 258 } | 260 } |
| 259 | 261 |
| 260 void CloseCurrentConnections() { | 262 void CloseCurrentConnections() { |
| 261 RenderThread::current()->CloseCurrentConnections(); | 263 RenderThread::current()->CloseCurrentConnections(); |
| 262 } | 264 } |
| 263 | 265 |
| 264 void SetCacheMode(bool enabled) { | 266 void SetCacheMode(bool enabled) { |
| 265 RenderThread::current()->SetCacheMode(enabled); | 267 RenderThread::current()->SetCacheMode(enabled); |
| 266 } | 268 } |
| 267 | 269 |
| 268 } // namespace webkit_glue | 270 } // namespace webkit_glue |
| OLD | NEW |