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

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

Issue 13243003: Move MessageLoop to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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_COMMON_CHILD_THREAD_H_ 5 #ifndef CONTENT_COMMON_CHILD_THREAD_H_
6 #define CONTENT_COMMON_CHILD_THREAD_H_ 6 #define CONTENT_COMMON_CHILD_THREAD_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/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "base/tracked_objects.h" 12 #include "base/tracked_objects.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/common/message_router.h" 14 #include "content/common/message_router.h"
15 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. 15 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
16 #include "webkit/glue/resource_loader_bridge.h" 16 #include "webkit/glue/resource_loader_bridge.h"
17 17
18 namespace base {
18 class MessageLoop; 19 class MessageLoop;
20 }
19 21
20 namespace IPC { 22 namespace IPC {
21 class SyncChannel; 23 class SyncChannel;
22 class SyncMessageFilter; 24 class SyncMessageFilter;
23 } 25 }
24 26
25 namespace WebKit { 27 namespace WebKit {
26 class WebFrame; 28 class WebFrame;
27 } 29 }
28 30
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // IPC::Sender it returns may be safely called on any thread including 99 // IPC::Sender it returns may be safely called on any thread including
98 // the main thread. 100 // the main thread.
99 ThreadSafeSender* thread_safe_sender() const { 101 ThreadSafeSender* thread_safe_sender() const {
100 return thread_safe_sender_; 102 return thread_safe_sender_;
101 } 103 }
102 104
103 ChildHistogramMessageFilter* child_histogram_message_filter() const { 105 ChildHistogramMessageFilter* child_histogram_message_filter() const {
104 return histogram_message_filter_.get(); 106 return histogram_message_filter_.get();
105 } 107 }
106 108
107 MessageLoop* message_loop() const { return message_loop_; } 109 base::MessageLoop* message_loop() const { return message_loop_; }
108 110
109 // Returns the one child thread. 111 // Returns the one child thread.
110 static ChildThread* current(); 112 static ChildThread* current();
111 113
112 virtual bool IsWebFrameValid(WebKit::WebFrame* frame); 114 virtual bool IsWebFrameValid(WebKit::WebFrame* frame);
113 115
114 protected: 116 protected:
115 friend class ChildProcess; 117 friend class ChildProcess;
116 118
117 // Called when the process refcount is 0. 119 // Called when the process refcount is 0.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Handles resource loads for this process. 161 // Handles resource loads for this process.
160 scoped_ptr<ResourceDispatcher> resource_dispatcher_; 162 scoped_ptr<ResourceDispatcher> resource_dispatcher_;
161 163
162 // Handles SocketStream for this process. 164 // Handles SocketStream for this process.
163 scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_; 165 scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_;
164 166
165 // The OnChannelError() callback was invoked - the channel is dead, don't 167 // The OnChannelError() callback was invoked - the channel is dead, don't
166 // attempt to communicate. 168 // attempt to communicate.
167 bool on_channel_error_called_; 169 bool on_channel_error_called_;
168 170
169 MessageLoop* message_loop_; 171 base::MessageLoop* message_loop_;
170 172
171 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; 173 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_;
172 174
173 scoped_ptr<QuotaDispatcher> quota_dispatcher_; 175 scoped_ptr<QuotaDispatcher> quota_dispatcher_;
174 176
175 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; 177 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_;
176 178
177 base::WeakPtrFactory<ChildThread> channel_connected_factory_; 179 base::WeakPtrFactory<ChildThread> channel_connected_factory_;
178 180
179 DISALLOW_COPY_AND_ASSIGN(ChildThread); 181 DISALLOW_COPY_AND_ASSIGN(ChildThread);
180 }; 182 };
181 183
182 } // namespace content 184 } // namespace content
183 185
184 #endif // CONTENT_COMMON_CHILD_THREAD_H_ 186 #endif // CONTENT_COMMON_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/common/child_histogram_message_filter.h ('k') | content/common/gpu/client/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698