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

Side by Side Diff: content/common/child_thread.cc

Issue 6711024: Example of how to interpose yourself in a message stream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
OLDNEW
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 #include "content/common/child_thread.h" 5 #include "content/common/child_thread.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "content/common/child_process.h" 10 #include "content/common/child_process.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 router_.RemoveRoute(routing_id); 121 router_.RemoveRoute(routing_id);
122 } 122 }
123 123
124 IPC::Channel::Listener* ChildThread::ResolveRoute(int32 routing_id) { 124 IPC::Channel::Listener* ChildThread::ResolveRoute(int32 routing_id) {
125 DCHECK(MessageLoop::current() == message_loop()); 125 DCHECK(MessageLoop::current() == message_loop());
126 126
127 return router_.ResolveRoute(routing_id); 127 return router_.ResolveRoute(routing_id);
128 } 128 }
129 129
130 void ChildThread::SetOutgoingMessageFilter(IPC::OutgoingMessageFilter* filter){
131 channel_->set_outgoing_message_filter(filter);
132 }
133
130 webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge( 134 webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge(
131 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 135 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
132 return resource_dispatcher()->CreateBridge(request_info); 136 return resource_dispatcher()->CreateBridge(request_info);
133 } 137 }
134 138
135 ResourceDispatcher* ChildThread::resource_dispatcher() { 139 ResourceDispatcher* ChildThread::resource_dispatcher() {
136 return resource_dispatcher_.get(); 140 return resource_dispatcher_.get();
137 } 141 }
138 142
139 IPC::SyncMessageFilter* ChildThread::sync_message_filter() { 143 IPC::SyncMessageFilter* ChildThread::sync_message_filter() {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 MessageLoop::current()->Quit(); 209 MessageLoop::current()->Quit();
206 return; 210 return;
207 } 211 }
208 212
209 // The child process shutdown sequence is a request response based mechanism, 213 // The child process shutdown sequence is a request response based mechanism,
210 // where we send out an initial feeler request to the child process host 214 // where we send out an initial feeler request to the child process host
211 // instance in the browser to verify if it's ok to shutdown the child process. 215 // instance in the browser to verify if it's ok to shutdown the child process.
212 // The browser then sends back a response if it's ok to shutdown. 216 // The browser then sends back a response if it's ok to shutdown.
213 Send(new ChildProcessHostMsg_ShutdownRequest); 217 Send(new ChildProcessHostMsg_ShutdownRequest);
214 } 218 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698