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

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

Issue 3201003: Fixed error message bubbles according to the latest mocks (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Comments resolved Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/task.h" 11 #include "base/task.h"
12 #include "chrome/browser/chromeos/login/login_status_consumer.h" 12 #include "chrome/browser/chromeos/login/login_status_consumer.h"
13 #include "chrome/browser/chromeos/login/message_bubble.h"
13 #include "chrome/browser/chromeos/login/user_manager.h" 14 #include "chrome/browser/chromeos/login/user_manager.h"
14 #include "chrome/browser/views/info_bubble.h"
15 15
16 namespace gfx { 16 namespace gfx {
17 class Rect; 17 class Rect;
18 } // namespace gfx 18 } // namespace gfx
19 19
20 namespace views { 20 namespace views {
21 class WidgetGtk; 21 class WidgetGtk;
22 } // namespace views 22 } // namespace views
23 23
24 namespace chromeos { 24 namespace chromeos {
25 25
26 class Authenticator; 26 class Authenticator;
27 class InputEventObserver; 27 class InputEventObserver;
28 class MessageBubble; 28 class MessageBubble;
29 class MouseEventRelay; 29 class MouseEventRelay;
30 class ScreenLockView; 30 class ScreenLockView;
31 class LoginFailure; 31 class LoginFailure;
32 32
33 namespace test { 33 namespace test {
34 class ScreenLockerTester; 34 class ScreenLockerTester;
35 } // namespace test 35 } // namespace test
36 36
37 // ScreenLocker creates a background view as well as ScreenLockView to 37 // ScreenLocker creates a background view as well as ScreenLockView to
38 // authenticate the user. ScreenLocker manages its life cycle and will 38 // authenticate the user. ScreenLocker manages its life cycle and will
39 // delete itself when it's unlocked. 39 // delete itself when it's unlocked.
40 class ScreenLocker : public LoginStatusConsumer, 40 class ScreenLocker : public LoginStatusConsumer,
41 public InfoBubbleDelegate { 41 public MessageBubbleDelegate {
42 public: 42 public:
43 explicit ScreenLocker(const UserManager::User& user); 43 explicit ScreenLocker(const UserManager::User& user);
44 44
45 // Initialize and show the screen locker. 45 // Initialize and show the screen locker.
46 void Init(); 46 void Init();
47 47
48 // LoginStatusConsumer implements: 48 // LoginStatusConsumer implements:
49 virtual void OnLoginFailure(const chromeos::LoginFailure& error); 49 virtual void OnLoginFailure(const chromeos::LoginFailure& error);
50 virtual void OnLoginSuccess(const std::string& username, 50 virtual void OnLoginSuccess(const std::string& username,
51 const GaiaAuthConsumer::ClientLoginResult& result); 51 const GaiaAuthConsumer::ClientLoginResult& result);
52 52
53 // Overridden from views::InfoBubbleDelegate. 53 // Overridden from views::InfoBubbleDelegate.
54 virtual void InfoBubbleClosing(InfoBubble* info_bubble, 54 virtual void InfoBubbleClosing(InfoBubble* info_bubble,
55 bool closed_by_escape); 55 bool closed_by_escape);
56 virtual bool CloseOnEscape() { return true; } 56 virtual bool CloseOnEscape() { return true; }
57 virtual bool FadeInOnShow() { return false; } 57 virtual bool FadeInOnShow() { return false; }
58 virtual void OnHelpLinkActivated() {}
58 59
59 // Authenticates the user with given |password| and authenticator. 60 // Authenticates the user with given |password| and authenticator.
60 void Authenticate(const string16& password); 61 void Authenticate(const string16& password);
61 62
62 // Close message bubble to clear error messages. 63 // Close message bubble to clear error messages.
63 void ClearErrors(); 64 void ClearErrors();
64 65
65 // (Re)enable input field. 66 // (Re)enable input field.
66 void EnableInput(); 67 void EnableInput();
67 68
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Reference to the single instance of the screen locker object. 153 // Reference to the single instance of the screen locker object.
153 // This is used to make sure there is only one screen locker instance. 154 // This is used to make sure there is only one screen locker instance.
154 static ScreenLocker* screen_locker_; 155 static ScreenLocker* screen_locker_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(ScreenLocker); 157 DISALLOW_COPY_AND_ASSIGN(ScreenLocker);
157 }; 158 };
158 159
159 } // namespace chromeos 160 } // namespace chromeos
160 161
161 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_H_ 162 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_LOCKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/new_user_view.cc ('k') | chrome/browser/chromeos/login/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698