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

Side by Side Diff: chrome/renderer/renderer_glue.cc

Issue 1625015: Refactor ChildProcess and related classes to create a framework outside of br... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/gpu_channel_host.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/renderer/gpu_channel_host.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698