| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 59 | 59 | 
| 60   // |Start()|s the child process; calls |DidStart()| (on the thread on which | 60   // |Start()|s the child process; calls |DidStart()| (on the thread on which | 
| 61   // |Start()| was called) when the child has been started (or failed to start). | 61   // |Start()| was called) when the child has been started (or failed to start). | 
| 62   void Start(const ProcessReadyCallback& callback); | 62   void Start(const ProcessReadyCallback& callback); | 
| 63 | 63 | 
| 64   // Waits for the child process to terminate, and returns its exit code. | 64   // Waits for the child process to terminate, and returns its exit code. | 
| 65   int Join(); | 65   int Join(); | 
| 66 | 66 | 
| 67   // See |mojom::ChildController|: | 67   // See |mojom::ChildController|: | 
| 68   void StartApp( | 68   void StartApp( | 
| 69       InterfaceRequest<mojom::Application> application_request, | 69       InterfaceRequest<mojom::ShellClient> request, | 
| 70       const mojom::ChildController::StartAppCallback& on_app_complete); | 70       const mojom::ChildController::StartAppCallback& on_app_complete); | 
| 71   void ExitNow(int32_t exit_code); | 71   void ExitNow(int32_t exit_code); | 
| 72 | 72 | 
| 73  protected: | 73  protected: | 
| 74   void DidStart(); | 74   void DidStart(); | 
| 75 | 75 | 
| 76  private: | 76  private: | 
| 77   // A thread-safe holder for the bootstrap message pipe to this child process. | 77   // A thread-safe holder for the bootstrap message pipe to this child process. | 
| 78   // The pipe is established on an arbitrary thread and may not be connected | 78   // The pipe is established on an arbitrary thread and may not be connected | 
| 79   // until the host's message loop has stopped running. | 79   // until the host's message loop has stopped running. | 
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 154 | 154 | 
| 155   base::WeakPtrFactory<ChildProcessHost> weak_factory_; | 155   base::WeakPtrFactory<ChildProcessHost> weak_factory_; | 
| 156 | 156 | 
| 157   DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); | 157   DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); | 
| 158 }; | 158 }; | 
| 159 | 159 | 
| 160 }  // namespace shell | 160 }  // namespace shell | 
| 161 }  // namespace mojo | 161 }  // namespace mojo | 
| 162 | 162 | 
| 163 #endif  // MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ | 163 #endif  // MOJO_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ | 
| OLD | NEW | 
|---|