| 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 "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 int Join(); | 45 int Join(); |
| 46 | 46 |
| 47 // Methods relayed to the |ChildController|. These methods may be only be | 47 // Methods relayed to the |ChildController|. These methods may be only be |
| 48 // called after |Start()|, but may be called immediately (without waiting for | 48 // called after |Start()|, but may be called immediately (without waiting for |
| 49 // |DidStart()|). | 49 // |DidStart()|). |
| 50 | 50 |
| 51 // Like |ChildController::StartApp()|, but with one difference: | 51 // Like |ChildController::StartApp()|, but with one difference: |
| 52 // |on_app_complete| will *always* get called, even on connection error (or | 52 // |on_app_complete| will *always* get called, even on connection error (or |
| 53 // even if the child process failed to start at all). | 53 // even if the child process failed to start at all). |
| 54 void StartApp(const mojo::String& app_path, | 54 void StartApp(const mojo::String& app_path, |
| 55 bool clean_app_path, | |
| 56 mojo::InterfaceRequest<mojo::Application> application_request, | 55 mojo::InterfaceRequest<mojo::Application> application_request, |
| 57 const ChildController::StartAppCallback& on_app_complete); | 56 const ChildController::StartAppCallback& on_app_complete); |
| 58 void ExitNow(int32_t exit_code); | 57 void ExitNow(int32_t exit_code); |
| 59 | 58 |
| 60 // TODO(vtl): This is virtual, so tests can override it, but really |Start()| | 59 // TODO(vtl): This is virtual, so tests can override it, but really |Start()| |
| 61 // should take a callback (see above) and this should be private. | 60 // should take a callback (see above) and this should be private. |
| 62 virtual void DidStart(bool success); | 61 virtual void DidStart(bool success); |
| 63 | 62 |
| 64 private: | 63 private: |
| 65 // Callback for |mojo::embedder::CreateChannel()|. | 64 // Callback for |mojo::embedder::CreateChannel()|. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 ChildController::StartAppCallback on_app_complete_; | 79 ChildController::StartAppCallback on_app_complete_; |
| 81 | 80 |
| 82 base::Process child_process_; | 81 base::Process child_process_; |
| 83 | 82 |
| 84 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); | 83 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace shell | 86 } // namespace shell |
| 88 | 87 |
| 89 #endif // SHELL_CHILD_PROCESS_HOST_H_ | 88 #endif // SHELL_CHILD_PROCESS_HOST_H_ |
| OLD | NEW |