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

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

Issue 7524014: cros: Remove the unneed default ctor from ScreenLockLibrary interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NotifyScreenLockCompleted should be after NotifyScreenLockRequested Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/observer_list.h"
10 #include "third_party/cros/chromeos_screen_lock.h"
11
12 namespace chromeos { 9 namespace chromeos {
13 10
14 // This interface defines interaction with the ChromeOS screen lock 11 // This interface handles the interaction with the ChromeOS screen lock API.
15 // APIs.
16 class ScreenLockLibrary { 12 class ScreenLockLibrary {
17 public: 13 public:
18 class Observer { 14 class Observer {
19 public: 15 public:
20 virtual ~Observer() {} 16 virtual ~Observer() {}
17
21 virtual void LockScreen(ScreenLockLibrary* obj) = 0; 18 virtual void LockScreen(ScreenLockLibrary* obj) = 0;
22 virtual void UnlockScreen(ScreenLockLibrary* obj) = 0; 19 virtual void UnlockScreen(ScreenLockLibrary* obj) = 0;
23 virtual void UnlockScreenFailed(ScreenLockLibrary* obj) = 0; 20 virtual void UnlockScreenFailed(ScreenLockLibrary* obj) = 0;
24 }; 21 };
25 ScreenLockLibrary() {} 22
stevenjb 2011/07/28 01:23:30 nit: While an empty constructor is not obligatory,
26 virtual ~ScreenLockLibrary() {} 23 virtual ~ScreenLockLibrary() {}
24
27 virtual void AddObserver(Observer* observer) = 0; 25 virtual void AddObserver(Observer* observer) = 0;
28 virtual void RemoveObserver(Observer* observer) = 0; 26 virtual void RemoveObserver(Observer* observer) = 0;
29 27
28 // Notifies PowerManager that a user requested to lock the screen.
29 virtual void NotifyScreenLockRequested() = 0;
30
30 // Notifies PowerManager that screen lock has been completed. 31 // Notifies PowerManager that screen lock has been completed.
31 virtual void NotifyScreenLockCompleted() = 0; 32 virtual void NotifyScreenLockCompleted() = 0;
32 // Notifies PowerManager that a user requested to lock the screen. 33
33 virtual void NotifyScreenLockRequested() = 0;
34 // Notifies PowerManager that a user unlocked the screen. 34 // Notifies PowerManager that a user unlocked the screen.
35 virtual void NotifyScreenUnlockRequested() = 0; 35 virtual void NotifyScreenUnlockRequested() = 0;
36
36 // Notifies PowerManager that screen is unlocked. 37 // Notifies PowerManager that screen is unlocked.
37 virtual void NotifyScreenUnlockCompleted() = 0; 38 virtual void NotifyScreenUnlockCompleted() = 0;
38 39
39 // Factory function, creates a new instance and returns ownership. 40 // Factory function, creates a new instance and returns ownership.
40 // For normal usage, access the singleton via CrosLibrary::Get(). 41 // For normal usage, access the singleton via CrosLibrary::Get().
41 static ScreenLockLibrary* GetImpl(bool stub); 42 static ScreenLockLibrary* GetImpl(bool stub);
42 }; 43 };
43 44
44 } // namespace chromeos 45 } // namespace chromeos
45 46
46 #endif // CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_ 47 #endif // CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698