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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHILD_CHILD_PROCESS_H_ 5 #ifndef CONTENT_CHILD_CHILD_PROCESS_H_
6 #define CONTENT_CHILD_CHILD_PROCESS_H_ 6 #define CONTENT_CHILD_CHILD_PROCESS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // May be NULL if the main thread hasn't been set explicitly. 26 // May be NULL if the main thread hasn't been set explicitly.
27 ChildThread* main_thread(); 27 ChildThread* main_thread();
28 28
29 // Sets the object associated with the main thread of this process. 29 // Sets the object associated with the main thread of this process.
30 // Takes ownership of the pointer. 30 // Takes ownership of the pointer.
31 void set_main_thread(ChildThread* thread); 31 void set_main_thread(ChildThread* thread);
32 32
33 base::MessageLoop* io_message_loop() { return io_thread_.message_loop(); } 33 base::MessageLoop* io_message_loop() { return io_thread_.message_loop(); }
34 base::MessageLoopProxy* io_message_loop_proxy() { 34 base::MessageLoopProxy* io_message_loop_proxy() {
35 return io_thread_.message_loop_proxy(); 35 return io_thread_.message_loop_proxy().get();
36 } 36 }
37 37
38 // A global event object that is signalled when the main thread's message 38 // A global event object that is signalled when the main thread's message
39 // loop exits. This gives background threads a way to observe the main 39 // loop exits. This gives background threads a way to observe the main
40 // thread shutting down. This can be useful when a background thread is 40 // thread shutting down. This can be useful when a background thread is
41 // waiting for some information from the browser process. If the browser 41 // waiting for some information from the browser process. If the browser
42 // process goes away prematurely, the background thread can at least notice 42 // process goes away prematurely, the background thread can at least notice
43 // the child processes's main thread exiting to determine that it should give 43 // the child processes's main thread exiting to determine that it should give
44 // up waiting. 44 // up waiting.
45 // For example, see the renderer code used to implement 45 // For example, see the renderer code used to implement
(...skipping 24 matching lines...) Expand all
70 // it depends on it (indirectly through IPC::SyncChannel). Same for 70 // it depends on it (indirectly through IPC::SyncChannel). Same for
71 // io_thread_. 71 // io_thread_.
72 scoped_ptr<ChildThread> main_thread_; 72 scoped_ptr<ChildThread> main_thread_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(ChildProcess); 74 DISALLOW_COPY_AND_ASSIGN(ChildProcess);
75 }; 75 };
76 76
77 } // namespace content 77 } // namespace content
78 78
79 #endif // CONTENT_CHILD_CHILD_PROCESS_H_ 79 #endif // CONTENT_CHILD_CHILD_PROCESS_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_screenshot_manager.cc ('k') | content/child/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698