OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LOGIN_SCREEN_LOCKER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 9 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 | 11 |
12 class GURL; | 12 class GURL; |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class WebUI; | 15 class WebUI; |
16 } | 16 } |
17 | 17 |
18 namespace chromeos { | 18 namespace chromeos { |
19 | 19 |
20 class ScreenLocker; | 20 class ScreenLocker; |
21 | 21 |
22 // ScreenLockerDelegate takes care of displaying the lock screen UI. | 22 // ScreenLockerDelegate takes care of displaying the lock screen UI. |
23 class ScreenLockerDelegate { | 23 class ScreenLockerDelegate { |
24 public: | 24 public: |
25 explicit ScreenLockerDelegate(ScreenLocker* screen_locker); | 25 explicit ScreenLockerDelegate(ScreenLocker* screen_locker); |
26 virtual ~ScreenLockerDelegate(); | 26 virtual ~ScreenLockerDelegate(); |
27 | 27 |
28 // Initialize the screen locker delegate. This will call ScreenLockReady when | 28 // Initialize the screen locker delegate. This will call ScreenLockReady when |
29 // done to notify ScreenLocker. | 29 // done to notify ScreenLocker. |
30 virtual void LockScreen(bool unlock_on_input) = 0; | 30 virtual void LockScreen() = 0; |
31 | 31 |
32 // Inform the screen locker that the screen has been locked | 32 // Inform the screen locker that the screen has been locked |
33 virtual void ScreenLockReady(); | 33 virtual void ScreenLockReady(); |
34 | 34 |
35 // This function is called when ScreenLocker::Authenticate is called to | 35 // This function is called when ScreenLocker::Authenticate is called to |
36 // attempt to authenticate with a given password. | 36 // attempt to authenticate with a given password. |
37 virtual void OnAuthenticate() = 0; | 37 virtual void OnAuthenticate() = 0; |
38 | 38 |
39 // Enable/disable password input. | 39 // Enable/disable password input. |
40 virtual void SetInputEnabled(bool enabled) = 0; | 40 virtual void SetInputEnabled(bool enabled) = 0; |
(...skipping 12 matching lines...) Expand all Loading... |
53 // Must call ScreenLocker::UnlockOnLoginSuccess() once all effects are done. | 53 // Must call ScreenLocker::UnlockOnLoginSuccess() once all effects are done. |
54 virtual void AnimateAuthenticationSuccess() = 0; | 54 virtual void AnimateAuthenticationSuccess() = 0; |
55 | 55 |
56 // Returns the native window displaying the lock screen. | 56 // Returns the native window displaying the lock screen. |
57 virtual gfx::NativeWindow GetNativeWindow() const = 0; | 57 virtual gfx::NativeWindow GetNativeWindow() const = 0; |
58 | 58 |
59 // Returns WebUI associated with screen locker implementation or NULL if | 59 // Returns WebUI associated with screen locker implementation or NULL if |
60 // there isn't one. | 60 // there isn't one. |
61 virtual content::WebUI* GetAssociatedWebUI(); | 61 virtual content::WebUI* GetAssociatedWebUI(); |
62 | 62 |
| 63 // Returns screen locker associated with delegate. |
| 64 ScreenLocker* screen_locker() { return screen_locker_; } |
| 65 |
63 protected: | 66 protected: |
64 // ScreenLocker that owns this delegate. | 67 // ScreenLocker that owns this delegate. |
65 ScreenLocker* screen_locker_; | 68 ScreenLocker* screen_locker_; |
66 | 69 |
67 DISALLOW_COPY_AND_ASSIGN(ScreenLockerDelegate); | 70 DISALLOW_COPY_AND_ASSIGN(ScreenLockerDelegate); |
68 }; | 71 }; |
69 | 72 |
70 } // namespace chromeos | 73 } // namespace chromeos |
71 | 74 |
72 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_ | 75 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_ |
OLD | NEW |