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

Side by Side Diff: chrome/browser/chromeos/login/screen_locker_delegate.h

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_
7
8 #include "base/callback_forward.h"
9 #include "base/strings/string16.h"
10 #include "chrome/browser/chromeos/login/help_app_launcher.h"
11 #include "chrome/browser/chromeos/login/login_display.h"
12 #include "ui/gfx/native_widget_types.h"
13
14 class GURL;
15
16 namespace content {
17 class WebUI;
18 }
19
20 namespace gfx {
21 class Image;
22 }
23
24 namespace chromeos {
25
26 class ScreenLocker;
27
28 // ScreenLockerDelegate takes care of displaying the lock screen UI.
29 class ScreenLockerDelegate {
30 public:
31 explicit ScreenLockerDelegate(ScreenLocker* screen_locker);
32 virtual ~ScreenLockerDelegate();
33
34 // Initialize the screen locker delegate. This will call ScreenLockReady when
35 // done to notify ScreenLocker.
36 virtual void LockScreen() = 0;
37
38 // Inform the screen locker that the screen has been locked
39 virtual void ScreenLockReady();
40
41 // This function is called when ScreenLocker::Authenticate is called to
42 // attempt to authenticate with a given password.
43 virtual void OnAuthenticate() = 0;
44
45 // Enable/disable password input.
46 virtual void SetInputEnabled(bool enabled) = 0;
47
48 // Displays a banner containing |message| on the lock screen.
49 virtual void ShowBannerMessage(const std::string& message) = 0;
50
51 // Shows a button inside the user pod on the lock screen with an icon.
52 virtual void ShowUserPodButton(const std::string& username,
53 const std::string& iconURL,
54 const base::Closure& click_callback) = 0;
55
56 // Hides the user pod button for a user.
57 virtual void HideUserPodButton(const std::string& username) = 0;
58
59 // Set the authentication type to be used on the lock screen.
60 virtual void SetAuthType(const std::string& username,
61 LoginDisplay::AuthType auth_type,
62 const std::string& initial_value) = 0;
63
64 // Returns the authentication type used for |username|.
65 virtual LoginDisplay::AuthType GetAuthType(const std::string& username)
66 const = 0;
67
68 // Disables all UI needed and shows error bubble with |message|.
69 // If |sign_out_only| is true then all other input except "Sign Out"
70 // button is blocked.
71 virtual void ShowErrorMessage(
72 int error_msg_id,
73 HelpAppLauncher::HelpTopic help_topic_id) = 0;
74
75 // Close message bubble to clear error messages.
76 virtual void ClearErrors() = 0;
77
78 // Allows to have visual effects once unlock authentication is successful,
79 // Must call ScreenLocker::UnlockOnLoginSuccess() once all effects are done.
80 virtual void AnimateAuthenticationSuccess() = 0;
81
82 // Returns the native window displaying the lock screen.
83 virtual gfx::NativeWindow GetNativeWindow() const = 0;
84
85 // Returns WebUI associated with screen locker implementation or NULL if
86 // there isn't one.
87 virtual content::WebUI* GetAssociatedWebUI();
88
89 // Called when webui lock screen is ready.
90 virtual void OnLockWebUIReady() = 0;
91
92 // Called when webui lock screen wallpaper is loaded and displayed.
93 virtual void OnLockBackgroundDisplayed() = 0;
94
95 // Returns screen locker associated with delegate.
96 ScreenLocker* screen_locker() { return screen_locker_; }
97
98 protected:
99 // ScreenLocker that owns this delegate.
100 ScreenLocker* screen_locker_;
101
102 DISALLOW_COPY_AND_ASSIGN(ScreenLockerDelegate);
103 };
104
105 } // namespace chromeos
106
107 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screen_locker_browsertest.cc ('k') | chrome/browser/chromeos/login/screen_locker_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698