Chromium Code Reviews| Index: chrome/browser/chromeos/arc/arc_process.h |
| diff --git a/chrome/browser/chromeos/arc/arc_process.h b/chrome/browser/chromeos/arc/arc_process.h |
| index 253f42b04fa2ceb600228f1ab989df189b66bbf8..e32e1918c91b12a29e1975cd39000f1682f34f4f 100644 |
| --- a/chrome/browser/chromeos/arc/arc_process.h |
| +++ b/chrome/browser/chromeos/arc/arc_process.h |
| @@ -1,21 +1,44 @@ |
| // Copyright 2016 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| + |
| #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| #define CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| #include <string> |
| +#include <vector> |
| #include "base/process/process_handle.h" |
| #include "components/arc/common/process.mojom.h" |
| namespace arc { |
| -struct ArcProcess { |
| - base::ProcessId nspid; |
| - base::ProcessId pid; |
| - std::string process_name; |
| - mojom::ProcessState process_state; |
| +class ArcProcess { |
| + public: |
| + ArcProcess(base::ProcessId nspid, |
| + base::ProcessId pid, |
| + const std::string& process_name, |
| + mojom::ProcessState process_state); |
| + ~ArcProcess(); |
| + |
| + ArcProcess(ArcProcess&& other); |
| + ArcProcess& operator=(ArcProcess&& other); |
| + |
| + base::ProcessId nspid() const { return nspid_; } |
| + base::ProcessId pid() const { return pid_; } |
| + std::string process_name() const { return process_name_; } |
|
dcheng
2016/06/01 23:55:01
Out of curiosity, why does this return by value wh
Yusuke Sato
2016/06/02 00:19:26
Oops, this is just a typo. Fixed, thanks.
|
| + mojom::ProcessState process_state() const { return process_state_; } |
| + std::vector<std::string>& packages() { return packages_; } |
| + const std::vector<std::string>& packages() const { return packages_; } |
| + |
| + private: |
| + base::ProcessId nspid_; |
| + base::ProcessId pid_; |
| + std::string process_name_; |
| + mojom::ProcessState process_state_; |
| + std::vector<std::string> packages_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcProcess); |
| }; |
| } // namespace arc |