OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ | 5 #ifndef MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ |
6 #define MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ | 6 #define MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // mojo application we wish to start. | 54 // mojo application we wish to start. |
55 ChildProcessHost(base::TaskRunner* launch_process_runner, | 55 ChildProcessHost(base::TaskRunner* launch_process_runner, |
56 NativeRunnerDelegate* delegate, | 56 NativeRunnerDelegate* delegate, |
57 bool start_sandboxed, | 57 bool start_sandboxed, |
58 const Identity& target, | 58 const Identity& target, |
59 const base::FilePath& app_path); | 59 const base::FilePath& app_path); |
60 virtual ~ChildProcessHost(); | 60 virtual ~ChildProcessHost(); |
61 | 61 |
62 // |Start()|s the child process; calls |DidStart()| (on the thread on which | 62 // |Start()|s the child process; calls |DidStart()| (on the thread on which |
63 // |Start()| was called) when the child has been started (or failed to start). | 63 // |Start()| was called) when the child has been started (or failed to start). |
64 mojom::ShellClientPtr Start(const String& name, | 64 mojom::ShellClientPtr Start(const Identity& target, |
65 const ProcessReadyCallback& callback, | 65 const ProcessReadyCallback& callback, |
66 const base::Closure& quit_closure); | 66 const base::Closure& quit_closure); |
67 | 67 |
68 // Waits for the child process to terminate. | 68 // Waits for the child process to terminate. |
69 void Join(); | 69 void Join(); |
70 | 70 |
71 protected: | 71 protected: |
72 void DidStart(const ProcessReadyCallback& callback); | 72 void DidStart(const ProcessReadyCallback& callback); |
73 | 73 |
74 private: | 74 private: |
(...skipping 16 matching lines...) Expand all Loading... |
91 | 91 |
92 base::WeakPtrFactory<ChildProcessHost> weak_factory_; | 92 base::WeakPtrFactory<ChildProcessHost> weak_factory_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); | 94 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); |
95 }; | 95 }; |
96 | 96 |
97 } // namespace shell | 97 } // namespace shell |
98 } // namespace mojo | 98 } // namespace mojo |
99 | 99 |
100 #endif // MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ | 100 #endif // MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ |
OLD | NEW |