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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 class ChildGpuMemoryBufferManager; | 39 class ChildGpuMemoryBufferManager; |
40 class ChildHistogramMessageFilter; | 40 class ChildHistogramMessageFilter; |
41 class ChildResourceMessageFilter; | 41 class ChildResourceMessageFilter; |
42 class ChildSharedBitmapManager; | 42 class ChildSharedBitmapManager; |
43 class FileSystemDispatcher; | 43 class FileSystemDispatcher; |
44 class GeofencingMessageFilter; | 44 class GeofencingMessageFilter; |
45 class ServiceWorkerMessageFilter; | 45 class ServiceWorkerMessageFilter; |
46 class QuotaDispatcher; | 46 class QuotaDispatcher; |
47 class QuotaMessageFilter; | 47 class QuotaMessageFilter; |
48 class ResourceDispatcher; | 48 class ResourceDispatcher; |
49 class SocketStreamDispatcher; | |
50 class ThreadSafeSender; | 49 class ThreadSafeSender; |
51 class WebSocketDispatcher; | 50 class WebSocketDispatcher; |
52 struct RequestInfo; | 51 struct RequestInfo; |
53 | 52 |
54 // The main thread of a child process derives from this class. | 53 // The main thread of a child process derives from this class. |
55 class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender { | 54 class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender { |
56 public: | 55 public: |
57 struct CONTENT_EXPORT Options { | 56 struct CONTENT_EXPORT Options { |
58 Options(); | 57 Options(); |
59 explicit Options(bool mojo); | 58 explicit Options(bool mojo); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 98 } |
100 | 99 |
101 ChildGpuMemoryBufferManager* gpu_memory_buffer_manager() const { | 100 ChildGpuMemoryBufferManager* gpu_memory_buffer_manager() const { |
102 return gpu_memory_buffer_manager_.get(); | 101 return gpu_memory_buffer_manager_.get(); |
103 } | 102 } |
104 | 103 |
105 ResourceDispatcher* resource_dispatcher() const { | 104 ResourceDispatcher* resource_dispatcher() const { |
106 return resource_dispatcher_.get(); | 105 return resource_dispatcher_.get(); |
107 } | 106 } |
108 | 107 |
109 SocketStreamDispatcher* socket_stream_dispatcher() const { | |
110 return socket_stream_dispatcher_.get(); | |
111 } | |
112 | |
113 WebSocketDispatcher* websocket_dispatcher() const { | 108 WebSocketDispatcher* websocket_dispatcher() const { |
114 return websocket_dispatcher_.get(); | 109 return websocket_dispatcher_.get(); |
115 } | 110 } |
116 | 111 |
117 FileSystemDispatcher* file_system_dispatcher() const { | 112 FileSystemDispatcher* file_system_dispatcher() const { |
118 return file_system_dispatcher_.get(); | 113 return file_system_dispatcher_.get(); |
119 } | 114 } |
120 | 115 |
121 QuotaDispatcher* quota_dispatcher() const { | 116 QuotaDispatcher* quota_dispatcher() const { |
122 return quota_dispatcher_.get(); | 117 return quota_dispatcher_.get(); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; | 210 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; |
216 | 211 |
217 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 212 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
218 | 213 |
219 // Implements message routing functionality to the consumers of ChildThread. | 214 // Implements message routing functionality to the consumers of ChildThread. |
220 ChildThreadMessageRouter router_; | 215 ChildThreadMessageRouter router_; |
221 | 216 |
222 // Handles resource loads for this process. | 217 // Handles resource loads for this process. |
223 scoped_ptr<ResourceDispatcher> resource_dispatcher_; | 218 scoped_ptr<ResourceDispatcher> resource_dispatcher_; |
224 | 219 |
225 // Handles SocketStream for this process. | |
226 scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_; | |
227 | |
228 scoped_ptr<WebSocketDispatcher> websocket_dispatcher_; | 220 scoped_ptr<WebSocketDispatcher> websocket_dispatcher_; |
229 | 221 |
230 // The OnChannelError() callback was invoked - the channel is dead, don't | 222 // The OnChannelError() callback was invoked - the channel is dead, don't |
231 // attempt to communicate. | 223 // attempt to communicate. |
232 bool on_channel_error_called_; | 224 bool on_channel_error_called_; |
233 | 225 |
234 base::MessageLoop* message_loop_; | 226 base::MessageLoop* message_loop_; |
235 | 227 |
236 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; | 228 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; |
237 | 229 |
(...skipping 22 matching lines...) Expand all Loading... |
260 bool in_browser_process_; | 252 bool in_browser_process_; |
261 | 253 |
262 base::WeakPtrFactory<ChildThread> channel_connected_factory_; | 254 base::WeakPtrFactory<ChildThread> channel_connected_factory_; |
263 | 255 |
264 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 256 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
265 }; | 257 }; |
266 | 258 |
267 } // namespace content | 259 } // namespace content |
268 | 260 |
269 #endif // CONTENT_CHILD_CHILD_THREAD_H_ | 261 #endif // CONTENT_CHILD_CHILD_THREAD_H_ |
OLD | NEW |