Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 |
|
satorux1
2011/11/11 17:02:33
Why is this removed? Please get the line back. :)
Lei Zhang
2011/11/11 19:54:50
whoops, fixed.
| |
| 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 // TODO(sque): Move to chrome/browser/chromeos/system, crosbug.com/16558 | 9 // TODO(sque): Move to chrome/browser/chromeos/system, crosbug.com/16558 |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 | 12 |
| 13 namespace base { | |
| 14 class TimeDelta; | |
| 15 } | |
| 16 | |
| 17 namespace chromeos { | 13 namespace chromeos { |
| 18 | 14 |
| 19 typedef base::Callback<void(int64_t)> CalculateIdleTimeCallback; | 15 typedef base::Callback<void(int64_t)> CalculateIdleTimeCallback; |
| 20 | 16 |
| 21 // This interface defines interaction with the ChromeOS power library APIs. | 17 // This interface defines interaction with the ChromeOS power library APIs. |
| 22 // Classes can add themselves as observers. Users can get an instance of this | 18 // Classes can add themselves as observers. Users can get an instance of this |
| 23 // library class like this: chromeos::CrosLibrary::Get()->GetPowerLibrary() | 19 // library class like this: chromeos::CrosLibrary::Get()->GetPowerLibrary() |
| 24 class PowerLibrary { | 20 class PowerLibrary { |
| 25 public: | 21 public: |
| 26 class Observer { | 22 class Observer { |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 52 virtual void RequestShutdown() = 0; | 48 virtual void RequestShutdown() = 0; |
| 53 | 49 |
| 54 // Factory function, creates a new instance and returns ownership. | 50 // Factory function, creates a new instance and returns ownership. |
| 55 // For normal usage, access the singleton via CrosLibrary::Get(). | 51 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 56 static PowerLibrary* GetImpl(bool stub); | 52 static PowerLibrary* GetImpl(bool stub); |
| 57 }; | 53 }; |
| 58 | 54 |
| 59 } // namespace chromeos | 55 } // namespace chromeos |
| 60 | 56 |
| 61 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_CROS_POWER_LIBRARY_H_ |
| OLD | NEW |