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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 class ScopedIPCSupport; | 48 class ScopedIPCSupport; |
49 } // namespace edk | 49 } // namespace edk |
50 } // namespace mojo | 50 } // namespace mojo |
51 | 51 |
52 namespace content { | 52 namespace content { |
53 class ChildHistogramMessageFilter; | 53 class ChildHistogramMessageFilter; |
54 class ChildResourceMessageFilter; | 54 class ChildResourceMessageFilter; |
55 class FileSystemDispatcher; | 55 class FileSystemDispatcher; |
56 class InProcessChildThreadParams; | 56 class InProcessChildThreadParams; |
57 class NotificationDispatcher; | 57 class NotificationDispatcher; |
58 class PushDispatcher; | |
59 class ServiceWorkerMessageFilter; | 58 class ServiceWorkerMessageFilter; |
60 class QuotaDispatcher; | 59 class QuotaDispatcher; |
61 class QuotaMessageFilter; | 60 class QuotaMessageFilter; |
62 class ResourceDispatcher; | 61 class ResourceDispatcher; |
63 class ThreadSafeSender; | 62 class ThreadSafeSender; |
64 | 63 |
65 // The main thread of a child process derives from this class. | 64 // The main thread of a child process derives from this class. |
66 class CONTENT_EXPORT ChildThreadImpl | 65 class CONTENT_EXPORT ChildThreadImpl |
67 : public IPC::Listener, | 66 : public IPC::Listener, |
68 virtual public ChildThread, | 67 virtual public ChildThread, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 130 } |
132 | 131 |
133 QuotaDispatcher* quota_dispatcher() const { | 132 QuotaDispatcher* quota_dispatcher() const { |
134 return quota_dispatcher_.get(); | 133 return quota_dispatcher_.get(); |
135 } | 134 } |
136 | 135 |
137 NotificationDispatcher* notification_dispatcher() const { | 136 NotificationDispatcher* notification_dispatcher() const { |
138 return notification_dispatcher_.get(); | 137 return notification_dispatcher_.get(); |
139 } | 138 } |
140 | 139 |
141 PushDispatcher* push_dispatcher() const { | |
142 return push_dispatcher_.get(); | |
143 } | |
144 | |
145 IPC::SyncMessageFilter* sync_message_filter() const { | 140 IPC::SyncMessageFilter* sync_message_filter() const { |
146 return sync_message_filter_.get(); | 141 return sync_message_filter_.get(); |
147 } | 142 } |
148 | 143 |
149 // The getter should only be called on the main thread, however the | 144 // The getter should only be called on the main thread, however the |
150 // IPC::Sender it returns may be safely called on any thread including | 145 // IPC::Sender it returns may be safely called on any thread including |
151 // the main thread. | 146 // the main thread. |
152 ThreadSafeSender* thread_safe_sender() const { | 147 ThreadSafeSender* thread_safe_sender() const { |
153 return thread_safe_sender_.get(); | 148 return thread_safe_sender_.get(); |
154 } | 149 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; | 291 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; |
297 | 292 |
298 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; | 293 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; |
299 | 294 |
300 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; | 295 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; |
301 | 296 |
302 scoped_refptr<QuotaMessageFilter> quota_message_filter_; | 297 scoped_refptr<QuotaMessageFilter> quota_message_filter_; |
303 | 298 |
304 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 299 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
305 | 300 |
306 scoped_refptr<PushDispatcher> push_dispatcher_; | |
307 | |
308 std::unique_ptr<base::PowerMonitor> power_monitor_; | 301 std::unique_ptr<base::PowerMonitor> power_monitor_; |
309 | 302 |
310 scoped_refptr<base::SingleThreadTaskRunner> browser_process_io_runner_; | 303 scoped_refptr<base::SingleThreadTaskRunner> browser_process_io_runner_; |
311 | 304 |
312 std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>> | 305 std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>> |
313 channel_connected_factory_; | 306 channel_connected_factory_; |
314 | 307 |
315 base::WeakPtrFactory<ChildThreadImpl> weak_factory_; | 308 base::WeakPtrFactory<ChildThreadImpl> weak_factory_; |
316 | 309 |
317 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); | 310 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); |
(...skipping 28 matching lines...) Expand all Loading... |
346 | 339 |
347 private: | 340 private: |
348 struct Options options_; | 341 struct Options options_; |
349 | 342 |
350 DISALLOW_COPY_AND_ASSIGN(Builder); | 343 DISALLOW_COPY_AND_ASSIGN(Builder); |
351 }; | 344 }; |
352 | 345 |
353 } // namespace content | 346 } // namespace content |
354 | 347 |
355 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 348 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
OLD | NEW |