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

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

Issue 5513001: Add a base class for objects that want to filter messages on the UI thread. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix possible race condition Created 10 years 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) 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 #include "chrome/common/child_thread.h" 5 #include "chrome/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 "chrome/common/child_process.h" 10 #include "chrome/common/child_process.h"
(...skipping 25 matching lines...) Expand all
36 check_with_browser_before_shutdown_ = false; 36 check_with_browser_before_shutdown_ = false;
37 on_channel_error_called_ = false; 37 on_channel_error_called_ = false;
38 message_loop_ = MessageLoop::current(); 38 message_loop_ = MessageLoop::current();
39 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) { 39 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) {
40 webkit_glue::SetUserAgent( 40 webkit_glue::SetUserAgent(
41 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 41 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
42 switches::kUserAgent)); 42 switches::kUserAgent));
43 } 43 }
44 44
45 channel_.reset(new IPC::SyncChannel(channel_name_, 45 channel_.reset(new IPC::SyncChannel(channel_name_,
46 IPC::Channel::MODE_CLIENT, this, NULL, 46 IPC::Channel::MODE_CLIENT, this,
47 ChildProcess::current()->io_message_loop(), true, 47 ChildProcess::current()->io_message_loop(), true,
48 ChildProcess::current()->GetShutDownEvent())); 48 ChildProcess::current()->GetShutDownEvent()));
49 #ifdef IPC_MESSAGE_LOG_ENABLED 49 #ifdef IPC_MESSAGE_LOG_ENABLED
50 IPC::Logging::current()->SetIPCSender(this); 50 IPC::Logging::current()->SetIPCSender(this);
51 #endif 51 #endif
52 52
53 resource_dispatcher_.reset(new ResourceDispatcher(this)); 53 resource_dispatcher_.reset(new ResourceDispatcher(this));
54 socket_stream_dispatcher_.reset(new SocketStreamDispatcher()); 54 socket_stream_dispatcher_.reset(new SocketStreamDispatcher());
55 file_system_dispatcher_.reset(new FileSystemDispatcher()); 55 file_system_dispatcher_.reset(new FileSystemDispatcher());
56 56
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 MessageLoop::current()->Quit(); 190 MessageLoop::current()->Quit();
191 return; 191 return;
192 } 192 }
193 193
194 // The child process shutdown sequence is a request response based mechanism, 194 // The child process shutdown sequence is a request response based mechanism,
195 // where we send out an initial feeler request to the child process host 195 // where we send out an initial feeler request to the child process host
196 // instance in the browser to verify if it's ok to shutdown the child process. 196 // instance in the browser to verify if it's ok to shutdown the child process.
197 // The browser then sends back a response if it's ok to shutdown. 197 // The browser then sends back a response if it's ok to shutdown.
198 Send(new PluginProcessHostMsg_ShutdownRequest); 198 Send(new PluginProcessHostMsg_ShutdownRequest);
199 } 199 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/gpu/gpu_channel.cc » ('j') | ipc/ipc_channel_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698