OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ | 5 #ifndef CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ |
6 #define CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ | 6 #define CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "mojo/public/cpp/system/message_pipe.h" | 13 #include "mojo/public/cpp/system/message_pipe.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 // Tells ChildThreadImpl to run in in-process mode. There are a couple of | 17 // Tells ChildThreadImpl to run in in-process mode. There are a couple of |
18 // parameters to run in the mode: An emulated io task runner used by | 18 // parameters to run in the mode: An emulated io task runner used by |
19 // ChnanelMojo, an IPC channel name to open. | 19 // ChnanelMojo, an IPC channel name to open. |
20 class CONTENT_EXPORT InProcessChildThreadParams { | 20 class CONTENT_EXPORT InProcessChildThreadParams { |
21 public: | 21 public: |
22 InProcessChildThreadParams( | 22 InProcessChildThreadParams( |
23 const std::string& channel_name, | 23 const std::string& channel_name, |
24 scoped_refptr<base::SequencedTaskRunner> io_runner, | 24 scoped_refptr<base::SequencedTaskRunner> io_runner, |
25 mojo::MessagePipeHandle handle = mojo::MessagePipeHandle()); | 25 mojo::MessagePipeHandle handle = mojo::MessagePipeHandle(), |
| 26 mojo::MessagePipeHandle application_handle = mojo::MessagePipeHandle()); |
26 InProcessChildThreadParams(const InProcessChildThreadParams& other); | 27 InProcessChildThreadParams(const InProcessChildThreadParams& other); |
27 ~InProcessChildThreadParams(); | 28 ~InProcessChildThreadParams(); |
28 | 29 |
29 const std::string& channel_name() const { return channel_name_; } | 30 const std::string& channel_name() const { return channel_name_; } |
30 scoped_refptr<base::SequencedTaskRunner> io_runner() const { | 31 scoped_refptr<base::SequencedTaskRunner> io_runner() const { |
31 return io_runner_; | 32 return io_runner_; |
32 } | 33 } |
33 mojo::MessagePipeHandle handle() const { return handle_; } | 34 mojo::MessagePipeHandle handle() const { return handle_; } |
| 35 mojo::MessagePipeHandle application_handle() const { |
| 36 return application_handle_; |
| 37 } |
34 | 38 |
35 private: | 39 private: |
36 std::string channel_name_; | 40 std::string channel_name_; |
37 scoped_refptr<base::SequencedTaskRunner> io_runner_; | 41 scoped_refptr<base::SequencedTaskRunner> io_runner_; |
38 mojo::MessagePipeHandle handle_; | 42 mojo::MessagePipeHandle handle_; |
| 43 mojo::MessagePipeHandle application_handle_; |
39 }; | 44 }; |
40 | 45 |
41 } // namespace content | 46 } // namespace content |
42 | 47 |
43 #endif // CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ | 48 #endif // CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ |
OLD | NEW |