OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_POWER_FREEZER_CGROUP_PROCESS_MANAGER_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_POWER_FREEZER_CGROUP_PROCESS_MANAGER_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
Daniel Erat
2014/09/16 04:42:47
nit: add base/macros.h for DISALLOW_COPY_AND_ASSIG
| |
9 #include "chrome/browser/chromeos/power/renderer_freezer.h" | |
10 | |
11 namespace chromeos { | |
12 | |
13 // Manages all the processes in the freezer cgroup on Chrome OS. | |
14 class FreezerCgroupProcessManager : public RendererFreezer::Delegate { | |
15 public: | |
16 FreezerCgroupProcessManager(); | |
17 virtual ~FreezerCgroupProcessManager(); | |
18 | |
19 // RendererFreezer::Delegate overrides. | |
20 virtual bool FreezeRenderers() OVERRIDE; | |
21 virtual bool ThawRenderers() OVERRIDE; | |
22 virtual bool CanFreezeRenderers() OVERRIDE; | |
23 | |
24 private: | |
25 bool WriteCommandToStateFile(const std::string& command); | |
26 | |
27 base::FilePath state_path_; | |
28 bool enabled_; | |
29 | |
30 DISALLOW_COPY_AND_ASSIGN(FreezerCgroupProcessManager); | |
31 }; | |
32 | |
33 } // namespace chromeos | |
34 | |
35 #endif // CHROME_BROWSER_CHROMEOS_POWER_FREEZER_CGROUP_PROCESS_MANAGER_H_ | |
OLD | NEW |