BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / chromeos / power / freezer_cgroup_process_manager.h
blobfd25b6ee3b54dcb2b4aee667ca29515054a992e6
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.
5 #ifndef CHROME_BROWSER_CHROMEOS_POWER_FREEZER_CGROUP_PROCESS_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_POWER_FREEZER_CGROUP_PROCESS_MANAGER_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/files/file_path.h"
12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/process/process_handle.h"
16 #include "chrome/browser/chromeos/power/renderer_freezer.h"
18 namespace base {
19 class SequencedTaskRunner;
22 namespace chromeos {
24 // Manages all the processes in the freezer cgroup on Chrome OS.
25 class FreezerCgroupProcessManager : public RendererFreezer::Delegate {
26 public:
27 FreezerCgroupProcessManager();
28 ~FreezerCgroupProcessManager() override;
30 // RendererFreezer::Delegate overrides.
31 void SetShouldFreezeRenderer(base::ProcessHandle handle,
32 bool frozen) override;
33 void FreezeRenderers() override;
34 void ThawRenderers(ResultCallback callback) override;
35 void CheckCanFreezeRenderers(ResultCallback callback) override;
37 private:
38 scoped_refptr<base::SequencedTaskRunner> file_thread_;
40 class FileWorker;
41 scoped_ptr<FileWorker> file_worker_;
43 DISALLOW_COPY_AND_ASSIGN(FreezerCgroupProcessManager);
46 } // namespace chromeos
48 #endif // CHROME_BROWSER_CHROMEOS_POWER_FREEZER_CGROUP_PROCESS_MANAGER_H_