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_IMPL_H_ | 5 #ifndef CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class FileSystemDispatcher; | 50 class FileSystemDispatcher; |
51 class InProcessChildThreadParams; | 51 class InProcessChildThreadParams; |
52 class NotificationDispatcher; | 52 class NotificationDispatcher; |
53 class PushDispatcher; | 53 class PushDispatcher; |
54 class ServiceWorkerMessageFilter; | 54 class ServiceWorkerMessageFilter; |
55 class QuotaDispatcher; | 55 class QuotaDispatcher; |
56 class QuotaMessageFilter; | 56 class QuotaMessageFilter; |
57 class ResourceDispatcher; | 57 class ResourceDispatcher; |
58 class ThreadSafeSender; | 58 class ThreadSafeSender; |
59 class WebSocketDispatcher; | 59 class WebSocketDispatcher; |
| 60 class WebSocketMessageFilter; |
60 struct RequestInfo; | 61 struct RequestInfo; |
61 | 62 |
62 // The main thread of a child process derives from this class. | 63 // The main thread of a child process derives from this class. |
63 class CONTENT_EXPORT ChildThreadImpl | 64 class CONTENT_EXPORT ChildThreadImpl |
64 : public IPC::Listener, | 65 : public IPC::Listener, |
65 virtual public ChildThread { | 66 virtual public ChildThread { |
66 public: | 67 public: |
67 struct CONTENT_EXPORT Options; | 68 struct CONTENT_EXPORT Options; |
68 | 69 |
69 // Creates the thread. | 70 // Creates the thread. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 168 } |
168 | 169 |
169 QuotaMessageFilter* quota_message_filter() const { | 170 QuotaMessageFilter* quota_message_filter() const { |
170 return quota_message_filter_.get(); | 171 return quota_message_filter_.get(); |
171 } | 172 } |
172 | 173 |
173 ChildResourceMessageFilter* child_resource_message_filter() const { | 174 ChildResourceMessageFilter* child_resource_message_filter() const { |
174 return resource_message_filter_.get(); | 175 return resource_message_filter_.get(); |
175 } | 176 } |
176 | 177 |
| 178 WebSocketMessageFilter* websocket_message_filter() const { |
| 179 return websocket_message_filter_.get(); |
| 180 } |
| 181 |
177 base::MessageLoop* message_loop() const { return message_loop_; } | 182 base::MessageLoop* message_loop() const { return message_loop_; } |
178 | 183 |
179 // Returns the one child thread. Can only be called on the main thread. | 184 // Returns the one child thread. Can only be called on the main thread. |
180 static ChildThreadImpl* current(); | 185 static ChildThreadImpl* current(); |
181 | 186 |
182 #if defined(OS_ANDROID) | 187 #if defined(OS_ANDROID) |
183 // Called on Android's service thread to shutdown the main thread of this | 188 // Called on Android's service thread to shutdown the main thread of this |
184 // process. | 189 // process. |
185 static void ShutdownThread(); | 190 static void ShutdownThread(); |
186 #endif | 191 #endif |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; | 274 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; |
270 | 275 |
271 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; | 276 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; |
272 | 277 |
273 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; | 278 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; |
274 | 279 |
275 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; | 280 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; |
276 | 281 |
277 scoped_refptr<QuotaMessageFilter> quota_message_filter_; | 282 scoped_refptr<QuotaMessageFilter> quota_message_filter_; |
278 | 283 |
| 284 scoped_refptr<WebSocketMessageFilter> websocket_message_filter_; |
| 285 |
279 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 286 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
280 | 287 |
281 scoped_refptr<PushDispatcher> push_dispatcher_; | 288 scoped_refptr<PushDispatcher> push_dispatcher_; |
282 | 289 |
283 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; | 290 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; |
284 | 291 |
285 std::unique_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_; | 292 std::unique_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_; |
286 | 293 |
287 std::unique_ptr<ChildDiscardableSharedMemoryManager> | 294 std::unique_ptr<ChildDiscardableSharedMemoryManager> |
288 discardable_shared_memory_manager_; | 295 discardable_shared_memory_manager_; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 333 |
327 private: | 334 private: |
328 struct Options options_; | 335 struct Options options_; |
329 | 336 |
330 DISALLOW_COPY_AND_ASSIGN(Builder); | 337 DISALLOW_COPY_AND_ASSIGN(Builder); |
331 }; | 338 }; |
332 | 339 |
333 } // namespace content | 340 } // namespace content |
334 | 341 |
335 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 342 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
OLD | NEW |