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 SHELL_CHILD_PROCESS_HOST_H_ | 5 #ifndef SHELL_CHILD_PROCESS_HOST_H_ |
6 #define SHELL_CHILD_PROCESS_HOST_H_ | 6 #define SHELL_CHILD_PROCESS_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 22 matching lines...) Expand all Loading... | |
33 // (see |DidStart()|). | 33 // (see |DidStart()|). |
34 virtual ~ChildProcessHost(); | 34 virtual ~ChildProcessHost(); |
35 | 35 |
36 // |Start()|s the child process; calls |DidStart()| (on the thread on which | 36 // |Start()|s the child process; calls |DidStart()| (on the thread on which |
37 // |Start()| was called) when the child has been started (or failed to start). | 37 // |Start()| was called) when the child has been started (or failed to start). |
38 // After calling |Start()|, this object must not be destroyed until | 38 // After calling |Start()|, this object must not be destroyed until |
39 // |DidStart()| has been called. | 39 // |DidStart()| has been called. |
40 // TODO(vtl): Consider using weak pointers and removing this requirement. | 40 // TODO(vtl): Consider using weak pointers and removing this requirement. |
41 // TODO(vtl): This should probably take a callback instead. | 41 // TODO(vtl): This should probably take a callback instead. |
42 // TODO(vtl): Consider merging this with |StartApp()|. | 42 // TODO(vtl): Consider merging this with |StartApp()|. |
43 void Start(); | 43 void Start(bool require_32_bit); |
Petr Hosek
2015/09/14 19:13:52
What if Mojo is built as 32-bit? Wouldn't it be be
Sean Klein
2015/09/15 18:37:50
An enum may eventually be useful, but at the momen
| |
44 | 44 |
45 // Waits for the child process to terminate, and returns its exit code. | 45 // Waits for the child process to terminate, and returns its exit code. |
46 // Note: If |Start()| has been called, this must not be called until the | 46 // Note: If |Start()| has been called, this must not be called until the |
47 // callback has been called. | 47 // callback has been called. |
48 int Join(); | 48 int Join(); |
49 | 49 |
50 // Methods relayed to the |ChildController|. These methods may be only be | 50 // Methods relayed to the |ChildController|. These methods may be only be |
51 // called after |Start()|, but may be called immediately (without waiting for | 51 // called after |Start()|, but may be called immediately (without waiting for |
52 // |DidStart()|). | 52 // |DidStart()|). |
53 | 53 |
(...skipping 29 matching lines...) Expand all Loading... | |
83 ChildController::StartAppCallback on_app_complete_; | 83 ChildController::StartAppCallback on_app_complete_; |
84 | 84 |
85 base::Process child_process_; | 85 base::Process child_process_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); | 87 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace shell | 90 } // namespace shell |
91 | 91 |
92 #endif // SHELL_CHILD_PROCESS_HOST_H_ | 92 #endif // SHELL_CHILD_PROCESS_HOST_H_ |
OLD | NEW |