cylee | 1fee649 | 2016-03-09 20:04:41 | [diff] [blame] | 1 | // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
yusukes | cd2c2981 | 2016-06-02 06:24:03 | [diff] [blame^] | 4 | |
cylee | 1fee649 | 2016-03-09 20:04:41 | [diff] [blame] | 5 | #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| 6 | #define CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| 7 | |
| 8 | #include <string> |
yusukes | cd2c2981 | 2016-06-02 06:24:03 | [diff] [blame^] | 9 | #include <vector> |
cylee | 1fee649 | 2016-03-09 20:04:41 | [diff] [blame] | 10 | |
| 11 | #include "base/process/process_handle.h" |
| 12 | #include "components/arc/common/process.mojom.h" |
| 13 | |
| 14 | namespace arc { |
| 15 | |
yusukes | cd2c2981 | 2016-06-02 06:24:03 | [diff] [blame^] | 16 | class ArcProcess { |
| 17 | public: |
| 18 | ArcProcess(base::ProcessId nspid, |
| 19 | base::ProcessId pid, |
| 20 | const std::string& process_name, |
| 21 | mojom::ProcessState process_state); |
| 22 | ~ArcProcess(); |
| 23 | |
| 24 | ArcProcess(ArcProcess&& other); |
| 25 | ArcProcess& operator=(ArcProcess&& other); |
| 26 | |
| 27 | base::ProcessId nspid() const { return nspid_; } |
| 28 | base::ProcessId pid() const { return pid_; } |
| 29 | const std::string& process_name() const { return process_name_; } |
| 30 | mojom::ProcessState process_state() const { return process_state_; } |
| 31 | std::vector<std::string>& packages() { return packages_; } |
| 32 | const std::vector<std::string>& packages() const { return packages_; } |
| 33 | |
| 34 | private: |
| 35 | base::ProcessId nspid_; |
| 36 | base::ProcessId pid_; |
| 37 | std::string process_name_; |
| 38 | mojom::ProcessState process_state_; |
| 39 | std::vector<std::string> packages_; |
| 40 | |
| 41 | DISALLOW_COPY_AND_ASSIGN(ArcProcess); |
cylee | 1fee649 | 2016-03-09 20:04:41 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | } // namespace arc |
| 45 | |
| 46 | #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |