OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "cros/chromeos_power.h" | 12 #include "third_party/cros/chromeos_power.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 // This interface defines interaction with the ChromeOS power library APIs. | 16 // This interface defines interaction with the ChromeOS power library APIs. |
17 // Classes can add themselves as observers. Users can get an instance of this | 17 // Classes can add themselves as observers. Users can get an instance of this |
18 // library class like this: chromeos::CrosLibrary::Get()->GetPowerLibrary() | 18 // library class like this: chromeos::CrosLibrary::Get()->GetPowerLibrary() |
19 class PowerLibrary { | 19 class PowerLibrary { |
20 public: | 20 public: |
21 class Observer { | 21 class Observer { |
22 public: | 22 public: |
(...skipping 30 matching lines...) Loading... |
53 virtual void RequestShutdown() = 0; | 53 virtual void RequestShutdown() = 0; |
54 | 54 |
55 // Factory function, creates a new instance and returns ownership. | 55 // Factory function, creates a new instance and returns ownership. |
56 // For normal usage, access the singleton via CrosLibrary::Get(). | 56 // For normal usage, access the singleton via CrosLibrary::Get(). |
57 static PowerLibrary* GetImpl(bool stub); | 57 static PowerLibrary* GetImpl(bool stub); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace chromeos | 60 } // namespace chromeos |
61 | 61 |
62 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ | 62 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
OLD | NEW |