Chromium Code Reviews| 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_RESUME_LIBRARY_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_RESUME_LIBRARY_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 namespace chromeos { | |
| 10 | |
| 11 class ResumeLibrary { | |
|
Nikita (slow)
2011/02/11 11:54:51
Please add comment.
glotov
2011/02/11 18:20:56
Done.
| |
| 12 public: | |
| 13 class Observer { | |
| 14 public: | |
| 15 virtual void SystemResumed() = 0; | |
|
Nikita (slow)
2011/02/11 11:54:51
May be it makes sense to make this callback a part
glotov
2011/02/11 18:20:56
I thought about it and cons were that callbacks ha
| |
| 16 }; | |
| 17 | |
| 18 virtual ~ResumeLibrary() {} | |
| 19 | |
| 20 virtual void AddObserver(Observer* observer) = 0; | |
| 21 virtual void RemoveObserver(Observer* observer) = 0; | |
| 22 | |
| 23 // Factory function, creates a new instance and returns ownership. | |
| 24 // For normal usage, access the singleton via CrosLibrary::Get(). | |
| 25 static ResumeLibrary* GetImpl(bool stub); | |
| 26 }; | |
| 27 | |
| 28 } // namespace chromeos | |
| 29 | |
| 30 #endif // CHROME_BROWSER_CHROMEOS_CROS_RESUME_LIBRARY_H_ | |
| OLD | NEW |