| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| 5 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| 6 | 7 |
| 7 #include <string> | 8 #include <string> |
| 9 #include <vector> |
| 8 | 10 |
| 9 #include "base/process/process_handle.h" | 11 #include "base/process/process_handle.h" |
| 10 #include "components/arc/common/process.mojom.h" | 12 #include "components/arc/common/process.mojom.h" |
| 11 | 13 |
| 12 namespace arc { | 14 namespace arc { |
| 13 | 15 |
| 14 struct ArcProcess { | 16 class ArcProcess { |
| 15 base::ProcessId nspid; | 17 public: |
| 16 base::ProcessId pid; | 18 ArcProcess(base::ProcessId nspid, |
| 17 std::string process_name; | 19 base::ProcessId pid, |
| 18 mojom::ProcessState process_state; | 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); |
| 19 }; | 42 }; |
| 20 | 43 |
| 21 } // namespace arc | 44 } // namespace arc |
| 22 | 45 |
| 23 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ | 46 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| OLD | NEW |