OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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_CROS_BRIGHTNESS_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_BRIGHTNESS_LIBRARY_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "cros/chromeos_brightness.h" |
| 10 |
| 11 namespace chromeos { |
| 12 |
| 13 class BrightnessLibrary { |
| 14 public: |
| 15 class Observer { |
| 16 public: |
| 17 virtual void BrightnessChanged(int level) = 0; |
| 18 }; |
| 19 |
| 20 virtual ~BrightnessLibrary() {} |
| 21 |
| 22 virtual void AddObserver(Observer* observer) = 0; |
| 23 virtual void RemoveObserver(Observer* observer) = 0; |
| 24 |
| 25 // Factory function, creates a new instance and returns ownership. |
| 26 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 27 static BrightnessLibrary* GetImpl(bool stub); |
| 28 }; |
| 29 |
| 30 } // namespace chromeos |
| 31 |
| 32 #endif // CHROME_BROWSER_CHROMEOS_CROS_BRIGHTNESS_LIBRARY_H_ |
OLD | NEW |