Chromium Code Reviews| Index: chrome/browser/chromeos/cros/resume_library.h |
| diff --git a/chrome/browser/chromeos/cros/resume_library.h b/chrome/browser/chromeos/cros/resume_library.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b3bbb12807bde16e2ecd9ffb1c165889bd42a85a |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/cros/resume_library.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_CROS_RESUME_LIBRARY_H_ |
| +#define CHROME_BROWSER_CHROMEOS_CROS_RESUME_LIBRARY_H_ |
| +#pragma once |
| + |
| +namespace chromeos { |
| + |
| +class ResumeLibrary { |
|
Nikita (slow)
2011/02/11 11:54:51
Please add comment.
glotov
2011/02/11 18:20:56
Done.
|
| + public: |
| + class Observer { |
| + public: |
| + 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
|
| + }; |
| + |
| + virtual ~ResumeLibrary() {} |
| + |
| + virtual void AddObserver(Observer* observer) = 0; |
| + virtual void RemoveObserver(Observer* observer) = 0; |
| + |
| + // Factory function, creates a new instance and returns ownership. |
| + // For normal usage, access the singleton via CrosLibrary::Get(). |
| + static ResumeLibrary* GetImpl(bool stub); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_CROS_RESUME_LIBRARY_H_ |