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 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/shared_memory.h" | 15 #include "base/memory/shared_memory.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/power_monitor/power_monitor.h" | 17 #include "base/power_monitor/power_monitor.h" |
18 #include "base/sequenced_task_runner.h" | 18 #include "base/sequenced_task_runner.h" |
19 #include "base/tracked_objects.h" | 19 #include "base/tracked_objects.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 #include "content/child/mojo/mojo_application.h" | 21 #include "content/child/mojo/mojo_application.h" |
22 #include "content/common/content_export.h" | 22 #include "content/common/content_export.h" |
23 #include "content/common/message_router.h" | 23 #include "content/common/message_router.h" |
24 #include "content/common/mojo/channel_init.h" | |
25 #include "content/public/child/child_thread.h" | 24 #include "content/public/child/child_thread.h" |
26 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 25 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
27 #include "ipc/ipc_platform_file.h" | 26 #include "ipc/ipc_platform_file.h" |
28 | 27 |
29 namespace base { | 28 namespace base { |
30 class MessageLoop; | 29 class MessageLoop; |
31 } // namespace base | 30 } // namespace base |
32 | 31 |
33 namespace IPC { | 32 namespace IPC { |
34 class AttachmentBrokerUnprivileged; | 33 class AttachmentBrokerUnprivileged; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 220 |
222 // We create the channel first without connecting it so we can add filters | 221 // We create the channel first without connecting it so we can add filters |
223 // prior to any messages being received, then connect it afterwards. | 222 // prior to any messages being received, then connect it afterwards. |
224 void ConnectChannel(bool use_mojo_channel); | 223 void ConnectChannel(bool use_mojo_channel); |
225 | 224 |
226 // IPC message handlers. | 225 // IPC message handlers. |
227 void OnShutdown(); | 226 void OnShutdown(); |
228 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); | 227 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); |
229 void OnGetChildProfilerData(int sequence_number, int current_profiling_phase); | 228 void OnGetChildProfilerData(int sequence_number, int current_profiling_phase); |
230 void OnProfilingPhaseCompleted(int profiling_phase); | 229 void OnProfilingPhaseCompleted(int profiling_phase); |
231 void OnBindExternalMojoShellHandle(const IPC::PlatformFileForTransit& file); | |
232 void OnSetMojoParentPipeHandle(const IPC::PlatformFileForTransit& file); | |
233 #ifdef IPC_MESSAGE_LOG_ENABLED | 230 #ifdef IPC_MESSAGE_LOG_ENABLED |
234 void OnSetIPCLoggingEnabled(bool enable); | 231 void OnSetIPCLoggingEnabled(bool enable); |
235 #endif | 232 #endif |
236 | 233 |
237 void EnsureConnected(); | 234 void EnsureConnected(); |
238 | 235 |
239 scoped_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_; | 236 scoped_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_; |
240 scoped_ptr<MojoApplication> mojo_application_; | 237 scoped_ptr<MojoApplication> mojo_application_; |
241 | 238 |
242 std::string channel_name_; | 239 std::string channel_name_; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 282 |
286 scoped_ptr<ChildDiscardableSharedMemoryManager> | 283 scoped_ptr<ChildDiscardableSharedMemoryManager> |
287 discardable_shared_memory_manager_; | 284 discardable_shared_memory_manager_; |
288 | 285 |
289 scoped_ptr<base::PowerMonitor> power_monitor_; | 286 scoped_ptr<base::PowerMonitor> power_monitor_; |
290 | 287 |
291 scoped_refptr<ChildMessageFilter> geofencing_message_filter_; | 288 scoped_refptr<ChildMessageFilter> geofencing_message_filter_; |
292 | 289 |
293 scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_; | 290 scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_; |
294 | 291 |
295 ChannelInit mojo_shell_channel_init_; | |
296 | |
297 base::WeakPtrFactory<ChildThreadImpl> channel_connected_factory_; | 292 base::WeakPtrFactory<ChildThreadImpl> channel_connected_factory_; |
298 | 293 |
299 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); | 294 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); |
300 }; | 295 }; |
301 | 296 |
302 struct ChildThreadImpl::Options { | 297 struct ChildThreadImpl::Options { |
303 ~Options(); | 298 ~Options(); |
304 | 299 |
305 class Builder; | 300 class Builder; |
306 | 301 |
(...skipping 19 matching lines...) Expand all Loading... |
326 | 321 |
327 private: | 322 private: |
328 struct Options options_; | 323 struct Options options_; |
329 | 324 |
330 DISALLOW_COPY_AND_ASSIGN(Builder); | 325 DISALLOW_COPY_AND_ASSIGN(Builder); |
331 }; | 326 }; |
332 | 327 |
333 } // namespace content | 328 } // namespace content |
334 | 329 |
335 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 330 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
OLD | NEW |