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

Side by Side Diff: content/common/child_process.h

Issue 6901146: Switch IPC::ChannelProxy to use MessageLoopProxy instead of MessageLoop. This allows us to remov... (Closed) Base URL: svn://chrome-svn/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 #ifndef CONTENT_COMMON_CHILD_PROCESS_H_ 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_H_
6 #define CONTENT_COMMON_CHILD_PROCESS_H_ 6 #define CONTENT_COMMON_CHILD_PROCESS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 12 matching lines...) Expand all
23 virtual ~ChildProcess(); 23 virtual ~ChildProcess();
24 24
25 // May be NULL if the main thread hasn't been set explicitly. 25 // May be NULL if the main thread hasn't been set explicitly.
26 ChildThread* main_thread(); 26 ChildThread* main_thread();
27 27
28 // Sets the object associated with the main thread of this process. 28 // Sets the object associated with the main thread of this process.
29 // Takes ownership of the pointer. 29 // Takes ownership of the pointer.
30 void set_main_thread(ChildThread* thread); 30 void set_main_thread(ChildThread* thread);
31 31
32 MessageLoop* io_message_loop() { return io_thread_.message_loop(); } 32 MessageLoop* io_message_loop() { return io_thread_.message_loop(); }
33 base::MessageLoopProxy* io_message_loop_proxy() {
34 return io_thread_.message_loop_proxy();
35 }
33 36
34 // A global event object that is signalled when the main thread's message 37 // A global event object that is signalled when the main thread's message
35 // loop exits. This gives background threads a way to observe the main 38 // loop exits. This gives background threads a way to observe the main
36 // thread shutting down. This can be useful when a background thread is 39 // thread shutting down. This can be useful when a background thread is
37 // waiting for some information from the browser process. If the browser 40 // waiting for some information from the browser process. If the browser
38 // process goes away prematurely, the background thread can at least notice 41 // process goes away prematurely, the background thread can at least notice
39 // the child processes's main thread exiting to determine that it should give 42 // the child processes's main thread exiting to determine that it should give
40 // up waiting. 43 // up waiting.
41 // For example, see the renderer code used to implement 44 // For example, see the renderer code used to implement
42 // webkit_glue::GetCookies. 45 // webkit_glue::GetCookies.
(...skipping 24 matching lines...) Expand all
67 // io_thread_. 70 // io_thread_.
68 scoped_ptr<ChildThread> main_thread_; 71 scoped_ptr<ChildThread> main_thread_;
69 72
70 // The singleton instance for this process. 73 // The singleton instance for this process.
71 static ChildProcess* child_process_; 74 static ChildProcess* child_process_;
72 75
73 DISALLOW_COPY_AND_ASSIGN(ChildProcess); 76 DISALLOW_COPY_AND_ASSIGN(ChildProcess);
74 }; 77 };
75 78
76 #endif // CONTENT_COMMON_CHILD_PROCESS_H_ 79 #endif // CONTENT_COMMON_CHILD_PROCESS_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/browser_render_process_host.cc ('k') | content/common/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698