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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 class WebFrame; | 35 class WebFrame; |
36 } // namespace blink | 36 } // namespace blink |
37 | 37 |
38 namespace content { | 38 namespace content { |
39 class ChildHistogramMessageFilter; | 39 class ChildHistogramMessageFilter; |
40 class ChildResourceMessageFilter; | 40 class ChildResourceMessageFilter; |
41 class ChildSharedBitmapManager; | 41 class ChildSharedBitmapManager; |
42 class FileSystemDispatcher; | 42 class FileSystemDispatcher; |
43 class ProcessBackgroundMessageFilter; | |
44 class ServiceWorkerMessageFilter; | 43 class ServiceWorkerMessageFilter; |
45 class QuotaDispatcher; | 44 class QuotaDispatcher; |
46 class QuotaMessageFilter; | 45 class QuotaMessageFilter; |
47 class ResourceDispatcher; | 46 class ResourceDispatcher; |
48 class SocketStreamDispatcher; | 47 class SocketStreamDispatcher; |
49 class ThreadSafeSender; | 48 class ThreadSafeSender; |
50 class WebSocketDispatcher; | 49 class WebSocketDispatcher; |
51 struct RequestInfo; | 50 struct RequestInfo; |
52 | 51 |
53 // The main thread of a child process derives from this class. | 52 // The main thread of a child process derives from this class. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 }; | 183 }; |
185 | 184 |
186 void Init(const Options& options); | 185 void Init(const Options& options); |
187 scoped_ptr<IPC::SyncChannel> CreateChannel(bool use_mojo_channel); | 186 scoped_ptr<IPC::SyncChannel> CreateChannel(bool use_mojo_channel); |
188 | 187 |
189 // IPC message handlers. | 188 // IPC message handlers. |
190 void OnShutdown(); | 189 void OnShutdown(); |
191 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); | 190 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); |
192 void OnGetChildProfilerData(int sequence_number); | 191 void OnGetChildProfilerData(int sequence_number); |
193 void OnDumpHandles(); | 192 void OnDumpHandles(); |
| 193 void OnProcessBackgrounded(bool background); |
194 #ifdef IPC_MESSAGE_LOG_ENABLED | 194 #ifdef IPC_MESSAGE_LOG_ENABLED |
195 void OnSetIPCLoggingEnabled(bool enable); | 195 void OnSetIPCLoggingEnabled(bool enable); |
196 #endif | 196 #endif |
197 #if defined(USE_TCMALLOC) | 197 #if defined(USE_TCMALLOC) |
198 void OnGetTcmallocStats(); | 198 void OnGetTcmallocStats(); |
199 #endif | 199 #endif |
200 | 200 |
201 void EnsureConnected(); | 201 void EnsureConnected(); |
202 | 202 |
203 scoped_ptr<MojoApplication> mojo_application_; | 203 scoped_ptr<MojoApplication> mojo_application_; |
(...skipping 28 matching lines...) Expand all Loading... |
232 scoped_ptr<QuotaDispatcher> quota_dispatcher_; | 232 scoped_ptr<QuotaDispatcher> quota_dispatcher_; |
233 | 233 |
234 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; | 234 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; |
235 | 235 |
236 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; | 236 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; |
237 | 237 |
238 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; | 238 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; |
239 | 239 |
240 scoped_refptr<QuotaMessageFilter> quota_message_filter_; | 240 scoped_refptr<QuotaMessageFilter> quota_message_filter_; |
241 | 241 |
242 scoped_refptr<ProcessBackgroundMessageFilter> | |
243 process_background_message_filter_; | |
244 | |
245 scoped_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; | 242 scoped_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; |
246 | 243 |
247 base::WeakPtrFactory<ChildThread> channel_connected_factory_; | 244 base::WeakPtrFactory<ChildThread> channel_connected_factory_; |
248 | 245 |
249 // Observes the trace event system. When tracing is enabled, optionally | 246 // Observes the trace event system. When tracing is enabled, optionally |
250 // starts profiling the tcmalloc heap. | 247 // starts profiling the tcmalloc heap. |
251 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; | 248 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; |
252 | 249 |
253 scoped_ptr<base::PowerMonitor> power_monitor_; | 250 scoped_ptr<base::PowerMonitor> power_monitor_; |
254 | 251 |
255 bool in_browser_process_; | 252 bool in_browser_process_; |
256 | 253 |
257 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 254 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
258 }; | 255 }; |
259 | 256 |
260 } // namespace content | 257 } // namespace content |
261 | 258 |
262 #endif // CONTENT_CHILD_CHILD_THREAD_H_ | 259 #endif // CONTENT_CHILD_CHILD_THREAD_H_ |
OLD | NEW |