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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 165 } |
165 | 166 |
166 QuotaMessageFilter* quota_message_filter() const { | 167 QuotaMessageFilter* quota_message_filter() const { |
167 return quota_message_filter_.get(); | 168 return quota_message_filter_.get(); |
168 } | 169 } |
169 | 170 |
170 ChildResourceMessageFilter* child_resource_message_filter() const { | 171 ChildResourceMessageFilter* child_resource_message_filter() const { |
171 return resource_message_filter_.get(); | 172 return resource_message_filter_.get(); |
172 } | 173 } |
173 | 174 |
| 175 WebSocketMessageFilter* websocket_message_filter() const { |
| 176 return websocket_message_filter_.get(); |
| 177 } |
| 178 |
174 base::MessageLoop* message_loop() const { return message_loop_; } | 179 base::MessageLoop* message_loop() const { return message_loop_; } |
175 | 180 |
176 // Returns the one child thread. Can only be called on the main thread. | 181 // Returns the one child thread. Can only be called on the main thread. |
177 static ChildThreadImpl* current(); | 182 static ChildThreadImpl* current(); |
178 | 183 |
179 #if defined(OS_ANDROID) | 184 #if defined(OS_ANDROID) |
180 // Called on Android's service thread to shutdown the main thread of this | 185 // Called on Android's service thread to shutdown the main thread of this |
181 // process. | 186 // process. |
182 static void ShutdownThread(); | 187 static void ShutdownThread(); |
183 #endif | 188 #endif |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; | 271 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; |
267 | 272 |
268 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; | 273 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; |
269 | 274 |
270 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; | 275 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; |
271 | 276 |
272 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; | 277 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; |
273 | 278 |
274 scoped_refptr<QuotaMessageFilter> quota_message_filter_; | 279 scoped_refptr<QuotaMessageFilter> quota_message_filter_; |
275 | 280 |
| 281 scoped_refptr<WebSocketMessageFilter> websocket_message_filter_; |
| 282 |
276 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 283 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
277 | 284 |
278 scoped_refptr<PushDispatcher> push_dispatcher_; | 285 scoped_refptr<PushDispatcher> push_dispatcher_; |
279 | 286 |
280 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; | 287 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; |
281 | 288 |
282 std::unique_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_; | 289 std::unique_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_; |
283 | 290 |
284 std::unique_ptr<ChildDiscardableSharedMemoryManager> | 291 std::unique_ptr<ChildDiscardableSharedMemoryManager> |
285 discardable_shared_memory_manager_; | 292 discardable_shared_memory_manager_; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 330 |
324 private: | 331 private: |
325 struct Options options_; | 332 struct Options options_; |
326 | 333 |
327 DISALLOW_COPY_AND_ASSIGN(Builder); | 334 DISALLOW_COPY_AND_ASSIGN(Builder); |
328 }; | 335 }; |
329 | 336 |
330 } // namespace content | 337 } // namespace content |
331 | 338 |
332 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 339 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
OLD | NEW |