Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: chrome/browser/chromeos/cros/resume_library.h

Issue 6486007: Introducing ResumeLibrary to track system resume signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698