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