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 SERVICES_NATIVE_SUPPORT_PROCESS_IMPL_H_ | 5 #ifndef SERVICES_NATIVE_SUPPORT_PROCESS_IMPL_H_ |
6 #define SERVICES_NATIVE_SUPPORT_PROCESS_IMPL_H_ | 6 #define SERVICES_NATIVE_SUPPORT_PROCESS_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 public: | 27 public: |
28 ProcessImpl(scoped_refptr<base::TaskRunner> worker_runner, | 28 ProcessImpl(scoped_refptr<base::TaskRunner> worker_runner, |
29 mojo::ApplicationConnection* connection, | 29 mojo::ApplicationConnection* connection, |
30 mojo::InterfaceRequest<Process> request); | 30 mojo::InterfaceRequest<Process> request); |
31 ~ProcessImpl() override; | 31 ~ProcessImpl() override; |
32 | 32 |
33 // |Process| implementation: | 33 // |Process| implementation: |
34 void Spawn(mojo::Array<uint8_t> path, | 34 void Spawn(mojo::Array<uint8_t> path, |
35 mojo::Array<mojo::Array<uint8_t>> argv, | 35 mojo::Array<mojo::Array<uint8_t>> argv, |
36 mojo::Array<mojo::Array<uint8_t>> envp, | 36 mojo::Array<mojo::Array<uint8_t>> envp, |
37 mojo::files::FilePtr stdin_file, | 37 mojo::InterfaceHandle<mojo::files::File> stdin_file, |
38 mojo::files::FilePtr stdout_file, | 38 mojo::InterfaceHandle<mojo::files::File> stdout_file, |
39 mojo::files::FilePtr stderr_file, | 39 mojo::InterfaceHandle<mojo::files::File> stderr_file, |
40 mojo::InterfaceRequest<ProcessController> process_controller, | 40 mojo::InterfaceRequest<ProcessController> process_controller, |
41 const SpawnCallback& callback) override; | 41 const SpawnCallback& callback) override; |
42 void SpawnWithTerminal( | 42 void SpawnWithTerminal( |
43 mojo::Array<uint8_t> path, | 43 mojo::Array<uint8_t> path, |
44 mojo::Array<mojo::Array<uint8_t>> argv, | 44 mojo::Array<mojo::Array<uint8_t>> argv, |
45 mojo::Array<mojo::Array<uint8_t>> envp, | 45 mojo::Array<mojo::Array<uint8_t>> envp, |
46 mojo::files::FilePtr terminal_file, | 46 mojo::InterfaceHandle<mojo::files::File> terminal_file, |
47 mojo::InterfaceRequest<ProcessController> process_controller, | 47 mojo::InterfaceRequest<ProcessController> process_controller, |
48 const SpawnWithTerminalCallback& callback) override; | 48 const SpawnWithTerminalCallback& callback) override; |
49 | 49 |
50 private: | 50 private: |
51 // Note: We take advantage of the fact that |SpawnCallback| and | 51 // Note: We take advantage of the fact that |SpawnCallback| and |
52 // |SpawnWithTerminalCallback| are the same. | 52 // |SpawnWithTerminalCallback| are the same. |
53 void SpawnImpl(mojo::Array<uint8_t> path, | 53 void SpawnImpl(mojo::Array<uint8_t> path, |
54 mojo::Array<mojo::Array<uint8_t>> argv, | 54 mojo::Array<mojo::Array<uint8_t>> argv, |
55 mojo::Array<mojo::Array<uint8_t>> envp, | 55 mojo::Array<mojo::Array<uint8_t>> envp, |
56 std::unique_ptr<ProcessIORedirection> process_io_redirection, | 56 std::unique_ptr<ProcessIORedirection> process_io_redirection, |
57 const std::vector<int>& fds_to_inherit, | 57 const std::vector<int>& fds_to_inherit, |
58 mojo::InterfaceRequest<ProcessController> process_controller, | 58 mojo::InterfaceRequest<ProcessController> process_controller, |
59 const SpawnCallback& callback); | 59 const SpawnCallback& callback); |
60 | 60 |
61 scoped_refptr<base::TaskRunner> worker_runner_; | 61 scoped_refptr<base::TaskRunner> worker_runner_; |
62 mojo::StrongBinding<Process> binding_; | 62 mojo::StrongBinding<Process> binding_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(ProcessImpl); | 64 DISALLOW_COPY_AND_ASSIGN(ProcessImpl); |
65 }; | 65 }; |
66 | 66 |
67 } // namespace native_support | 67 } // namespace native_support |
68 | 68 |
69 #endif // SERVICES_NATIVE_SUPPORT_PROCESS_IMPL_H_ | 69 #endif // SERVICES_NATIVE_SUPPORT_PROCESS_IMPL_H_ |
OLD | NEW |