OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
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 CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_ | 5 #ifndef DEVICE_POWER_SAVE_BLOCKER_POWER_SAVE_BLOCKER_IMPL_H_ |
6 #define CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_ | 6 #define DEVICE_POWER_SAVE_BLOCKER_POWER_SAVE_BLOCKER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "content/public/browser/power_save_blocker.h" | 16 #include "device/power_save_blocker/power_save_blocker.h" |
17 | 17 |
18 #if defined(OS_ANDROID) | 18 #if defined(OS_ANDROID) |
19 #include "ui/android/view_android.h" | 19 #include "ui/android/view_android.h" |
20 #endif // OS_ANDROID | 20 #endif // OS_ANDROID |
21 | 21 |
22 namespace content { | 22 namespace device { |
23 | 23 |
24 class WebContents; | 24 class WebContents; |
25 | 25 |
26 class PowerSaveBlockerImpl : public PowerSaveBlocker { | 26 class PowerSaveBlockerImpl : public PowerSaveBlocker { |
27 public: | 27 public: |
28 PowerSaveBlockerImpl( | 28 PowerSaveBlockerImpl( |
29 PowerSaveBlockerType type, | 29 PowerSaveBlockerType type, |
30 Reason reason, | 30 Reason reason, |
31 const std::string& description, | 31 const std::string& description, |
32 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, | 32 scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
(...skipping 29 matching lines...) Expand all Loading... |
62 // block system suspend when screen saver / display sleep is blocked. | 62 // block system suspend when screen saver / display sleep is blocked. |
63 scoped_refptr<Delegate> freedesktop_suspend_delegate_; | 63 scoped_refptr<Delegate> freedesktop_suspend_delegate_; |
64 #endif | 64 #endif |
65 | 65 |
66 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 66 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
67 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 67 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerImpl); | 69 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerImpl); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace content | 72 } // namespace device |
73 | 73 |
74 #endif // CONTENT_BROWSER_POWER_SAVE_BLOCKER_IMPL_H_ | 74 #endif // DEVICE_POWER_SAVE_BLOCKER_POWER_SAVE_BLOCKER_IMPL_H_ |
OLD | NEW |