Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
|
Yusuke Sato
2016/06/27 16:40:51
Please file a placeholder bug (http://crbug.com/ne
cylee1
2016/07/14 19:15:24
Done.
| |
| 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 CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
|
Yusuke Sato
2016/06/27 16:40:50
#include <stdint.h> ?
cylee1
2016/07/14 19:15:24
Done.
| |
| 11 #include "base/process/process_handle.h" | 11 #include "base/process/process_handle.h" |
| 12 #include "components/arc/common/process.mojom.h" | 12 #include "components/arc/common/process.mojom.h" |
| 13 | 13 |
| 14 namespace arc { | 14 namespace arc { |
| 15 | 15 |
| 16 class ArcProcess { | 16 class ArcProcess { |
| 17 public: | 17 public: |
| 18 // TODO(cylee): Deprecate process_state if possible. | |
| 18 ArcProcess(base::ProcessId nspid, | 19 ArcProcess(base::ProcessId nspid, |
| 19 base::ProcessId pid, | 20 base::ProcessId pid, |
| 20 const std::string& process_name, | 21 const std::string& process_name, |
| 21 mojom::ProcessState process_state); | 22 mojom::ProcessState process_state, |
| 23 int adj, | |
|
Yusuke Sato
2016/06/27 16:40:50
Can you use a more descriptive name for this?
htt
cylee1
2016/07/14 19:15:24
The parameter is replaced by is_focused.
| |
| 24 int64_t last_activity_time); | |
| 22 ~ArcProcess(); | 25 ~ArcProcess(); |
| 23 | 26 |
| 24 ArcProcess(ArcProcess&& other); | 27 ArcProcess(ArcProcess&& other); |
| 25 ArcProcess& operator=(ArcProcess&& other); | 28 ArcProcess& operator=(ArcProcess&& other); |
| 26 | 29 |
| 27 base::ProcessId nspid() const { return nspid_; } | 30 base::ProcessId nspid() const { return nspid_; } |
| 28 base::ProcessId pid() const { return pid_; } | 31 base::ProcessId pid() const { return pid_; } |
| 29 const std::string& process_name() const { return process_name_; } | 32 const std::string& process_name() const { return process_name_; } |
| 30 mojom::ProcessState process_state() const { return process_state_; } | 33 mojom::ProcessState process_state() const { return process_state_; } |
| 34 int adj() const { return adj_; } | |
| 35 int64_t last_activity_time() const { return last_activity_time_; } | |
| 31 std::vector<std::string>& packages() { return packages_; } | 36 std::vector<std::string>& packages() { return packages_; } |
| 32 const std::vector<std::string>& packages() const { return packages_; } | 37 const std::vector<std::string>& packages() const { return packages_; } |
| 33 | 38 |
| 34 private: | 39 private: |
| 35 base::ProcessId nspid_; | 40 base::ProcessId nspid_; |
| 36 base::ProcessId pid_; | 41 base::ProcessId pid_; |
| 37 std::string process_name_; | 42 std::string process_name_; |
| 38 mojom::ProcessState process_state_; | 43 mojom::ProcessState process_state_; |
| 44 int adj_; | |
|
Yusuke Sato
2016/06/27 16:40:50
Please document what this is.
cylee1
2016/07/14 19:15:24
Replaced.
| |
| 45 int64_t last_activity_time_; | |
|
Yusuke Sato
2016/06/27 16:40:51
same. (what is the epoch of the time btw?)
cylee1
2016/07/14 19:15:24
Done.
| |
| 39 std::vector<std::string> packages_; | 46 std::vector<std::string> packages_; |
| 40 | 47 |
| 41 DISALLOW_COPY_AND_ASSIGN(ArcProcess); | 48 DISALLOW_COPY_AND_ASSIGN(ArcProcess); |
| 42 }; | 49 }; |
| 43 | 50 |
| 44 } // namespace arc | 51 } // namespace arc |
| 45 | 52 |
| 46 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ | 53 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_PROCESS_H_ |
| OLD | NEW |