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

Side by Side Diff: chrome/browser/chromeos/cros/screen_lock_library.h

Issue 8934019: chromeos: Remove ScreenLockLibrary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_SCREEN_LOCK_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_
7 #pragma once
8
9 namespace chromeos {
10
11 // This interface handles the interaction with the ChromeOS screen lock API.
12 class ScreenLockLibrary {
13 public:
14 class Observer {
15 public:
16 virtual ~Observer() {}
17
18 virtual void LockScreen(ScreenLockLibrary* obj) = 0;
19 virtual void UnlockScreen(ScreenLockLibrary* obj) = 0;
20 virtual void UnlockScreenFailed(ScreenLockLibrary* obj) = 0;
21 };
22
23 virtual ~ScreenLockLibrary() {}
24
25 virtual void Init() = 0;
26
27 virtual void AddObserver(Observer* observer) = 0;
28 virtual void RemoveObserver(Observer* observer) = 0;
29
30 // Notifies PowerManager that a user requested to lock the screen.
31 virtual void NotifyScreenLockRequested() = 0;
32
33 // Notifies PowerManager that screen lock has been completed.
34 virtual void NotifyScreenLockCompleted() = 0;
35
36 // Notifies PowerManager that a user unlocked the screen.
37 virtual void NotifyScreenUnlockRequested() = 0;
38
39 // Notifies PowerManager that screen is unlocked.
40 virtual void NotifyScreenUnlockCompleted() = 0;
41
42 // Factory function, creates a new instance and returns ownership.
43 // For normal usage, access the singleton via CrosLibrary::Get().
44 static ScreenLockLibrary* GetImpl(bool stub);
45 };
46
47 } // namespace chromeos
48
49 #endif // CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mock_screen_lock_library.cc ('k') | chrome/browser/chromeos/cros/screen_lock_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698