OLD | NEW |
---|---|
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_THREAD_H_ | 5 #ifndef CONTENT_CHILD_CHILD_THREAD_H_ |
6 #define CONTENT_CHILD_CHILD_THREAD_H_ | 6 #define CONTENT_CHILD_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/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/power_monitor/power_monitor.h" | 12 #include "base/power_monitor/power_monitor.h" |
13 #include "base/tracked_objects.h" | 13 #include "base/tracked_objects.h" |
14 #include "content/child/websocket_dispatcher.h" | |
14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
15 #include "content/common/message_router.h" | 16 #include "content/common/message_router.h" |
16 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 17 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
17 #include "webkit/child/resource_loader_bridge.h" | 18 #include "webkit/child/resource_loader_bridge.h" |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class MessageLoop; | 21 class MessageLoop; |
21 | 22 |
22 namespace debug { | 23 namespace debug { |
23 class TraceMemoryController; | 24 class TraceMemoryController; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 IPC::Sender* sender); | 85 IPC::Sender* sender); |
85 | 86 |
86 ResourceDispatcher* resource_dispatcher() const { | 87 ResourceDispatcher* resource_dispatcher() const { |
87 return resource_dispatcher_.get(); | 88 return resource_dispatcher_.get(); |
88 } | 89 } |
89 | 90 |
90 SocketStreamDispatcher* socket_stream_dispatcher() const { | 91 SocketStreamDispatcher* socket_stream_dispatcher() const { |
91 return socket_stream_dispatcher_.get(); | 92 return socket_stream_dispatcher_.get(); |
92 } | 93 } |
93 | 94 |
95 WebSocketDispatcher* websocket_dispatcher() const { | |
96 return websocket_dispatcher_.get(); | |
97 } | |
98 | |
94 FileSystemDispatcher* file_system_dispatcher() const { | 99 FileSystemDispatcher* file_system_dispatcher() const { |
95 return file_system_dispatcher_.get(); | 100 return file_system_dispatcher_.get(); |
96 } | 101 } |
97 | 102 |
98 QuotaDispatcher* quota_dispatcher() const { | 103 QuotaDispatcher* quota_dispatcher() const { |
99 return quota_dispatcher_.get(); | 104 return quota_dispatcher_.get(); |
100 } | 105 } |
101 | 106 |
102 IPC::SyncMessageFilter* sync_message_filter() const { | 107 IPC::SyncMessageFilter* sync_message_filter() const { |
103 return sync_message_filter_.get(); | 108 return sync_message_filter_.get(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 | 178 |
174 // Implements message routing functionality to the consumers of ChildThread. | 179 // Implements message routing functionality to the consumers of ChildThread. |
175 MessageRouter router_; | 180 MessageRouter router_; |
176 | 181 |
177 // Handles resource loads for this process. | 182 // Handles resource loads for this process. |
178 scoped_ptr<ResourceDispatcher> resource_dispatcher_; | 183 scoped_ptr<ResourceDispatcher> resource_dispatcher_; |
179 | 184 |
180 // Handles SocketStream for this process. | 185 // Handles SocketStream for this process. |
181 scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_; | 186 scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_; |
182 | 187 |
188 scoped_ptr<WebSocketDispatcher> websocket_dispatcher_; | |
piman
2013/09/12 07:30:21
What creates this?
Is it needed on all child proce
yhirano
2013/09/13 12:32:29
WebSocket should work on worker threads, so I woul
| |
189 | |
183 // The OnChannelError() callback was invoked - the channel is dead, don't | 190 // The OnChannelError() callback was invoked - the channel is dead, don't |
184 // attempt to communicate. | 191 // attempt to communicate. |
185 bool on_channel_error_called_; | 192 bool on_channel_error_called_; |
186 | 193 |
187 base::MessageLoop* message_loop_; | 194 base::MessageLoop* message_loop_; |
188 | 195 |
189 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; | 196 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; |
190 | 197 |
191 scoped_ptr<QuotaDispatcher> quota_dispatcher_; | 198 scoped_ptr<QuotaDispatcher> quota_dispatcher_; |
192 | 199 |
(...skipping 10 matching lines...) Expand all Loading... | |
203 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; | 210 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; |
204 | 211 |
205 scoped_ptr<base::PowerMonitor> power_monitor_; | 212 scoped_ptr<base::PowerMonitor> power_monitor_; |
206 | 213 |
207 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 214 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
208 }; | 215 }; |
209 | 216 |
210 } // namespace content | 217 } // namespace content |
211 | 218 |
212 #endif // CONTENT_CHILD_CHILD_THREAD_H_ | 219 #endif // CONTENT_CHILD_CHILD_THREAD_H_ |
OLD | NEW |