Elly Jones | a44d22d | 2012-01-05 18:05:56 -0500 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 5 | #ifndef DEBUGD_SRC_SUBPROCESS_TOOL_H_ |
| 6 | #define DEBUGD_SRC_SUBPROCESS_TOOL_H_ |
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 7 | |
| 8 | #include <map> |
| 9 | #include <string> |
| 10 | |
| 11 | #include <base/basictypes.h> |
| 12 | #include <dbus-c++/dbus.h> |
| 13 | |
| 14 | namespace debugd { |
| 15 | |
| 16 | class ProcessWithId; |
| 17 | |
| 18 | class SubprocessTool { |
| 19 | public: |
Ben Chan | 78f8953 | 2014-08-29 09:35:09 -0700 | [diff] [blame] | 20 | SubprocessTool() = default; |
| 21 | virtual ~SubprocessTool() = default; |
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 22 | |
Elly Fong-Jones | d9a16cd | 2012-11-12 16:09:49 -0500 | [diff] [blame] | 23 | virtual ProcessWithId* CreateProcess(bool sandbox); |
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 24 | virtual void Stop(const std::string& handle, DBus::Error* error); |
| 25 | |
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 26 | private: |
| 27 | std::map<std::string, ProcessWithId*> processes_; |
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 28 | |
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 29 | DISALLOW_COPY_AND_ASSIGN(SubprocessTool); |
| 30 | }; |
| 31 | |
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 32 | } // namespace debugd |
Elly Jones | 0c016cc | 2011-12-19 16:19:22 -0500 | [diff] [blame] | 33 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 34 | #endif // DEBUGD_SRC_SUBPROCESS_TOOL_H_ |