OLD | NEW |
---|---|
1 // Copyright (c) 2011 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_LOGIN_DOM_LOGIN_DISPLAY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_DOM_LOGIN_DISPLAY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_DOM_LOGIN_DISPLAY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_DOM_LOGIN_DISPLAY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/browser/chromeos/login/login_display.h" | 13 #include "chrome/browser/chromeos/login/login_display.h" |
14 #include "chrome/browser/chromeos/login/user_manager.h" | 14 #include "chrome/browser/chromeos/login/user_manager.h" |
15 #include "chrome/browser/chromeos/login/webui_login_view.h" | |
15 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h" | 16 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h" |
16 | 17 |
17 namespace gfx { | 18 namespace gfx { |
18 class Rect; | 19 class Rect; |
19 } // namespace gfx | 20 } // namespace gfx |
20 | 21 |
21 namespace chromeos { | 22 namespace chromeos { |
22 | 23 |
23 class DOMBrowser; | 24 class DOMBrowser; |
24 | 25 |
(...skipping 16 matching lines...) Expand all Loading... | |
41 // set_login_handler(this); | 42 // set_login_handler(this); |
42 | 43 |
43 class DOMLoginDisplay : public LoginDisplay, | 44 class DOMLoginDisplay : public LoginDisplay, |
44 public LoginUIHandlerDelegate { | 45 public LoginUIHandlerDelegate { |
45 public: | 46 public: |
46 virtual ~DOMLoginDisplay(); | 47 virtual ~DOMLoginDisplay(); |
47 | 48 |
48 // Singleton implementation: | 49 // Singleton implementation: |
49 static DOMLoginDisplay* GetInstance(); | 50 static DOMLoginDisplay* GetInstance(); |
50 | 51 |
52 static views::Widget* GetCurrentLoginWindow(); | |
53 views::Widget* LoginWindow(); | |
oshima
2011/05/19 01:45:19
Please add comments for these method.
rharrison
2011/05/19 16:45:28
Done.
| |
54 | |
51 // LoginDisplay implementation: | 55 // LoginDisplay implementation: |
52 virtual void Destroy() OVERRIDE; | 56 virtual void Destroy() OVERRIDE; |
53 virtual void Init(const std::vector<UserManager::User>& users, | 57 virtual void Init(const std::vector<UserManager::User>& users, |
54 bool show_guest, | 58 bool show_guest, |
55 bool show_new_user) OVERRIDE; | 59 bool show_new_user) OVERRIDE; |
56 virtual void OnBeforeUserRemoved(const std::string& username) OVERRIDE; | 60 virtual void OnBeforeUserRemoved(const std::string& username) OVERRIDE; |
57 virtual void OnUserImageChanged(UserManager::User* user) OVERRIDE; | 61 virtual void OnUserImageChanged(UserManager::User* user) OVERRIDE; |
58 virtual void OnUserRemoved(const std::string& username) OVERRIDE; | 62 virtual void OnUserRemoved(const std::string& username) OVERRIDE; |
59 virtual void OnFadeOut() OVERRIDE; | 63 virtual void OnFadeOut() OVERRIDE; |
60 virtual void SetUIEnabled(bool is_enabled) OVERRIDE; | 64 virtual void SetUIEnabled(bool is_enabled) OVERRIDE; |
61 virtual void ShowError(int error_msg_id, | 65 virtual void ShowError(int error_msg_id, |
62 int login_attempts, | 66 int login_attempts, |
63 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; | 67 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; |
64 | 68 |
65 // LoginUIHandlerDelegate | 69 // LoginUIHandlerDelegate |
66 virtual void Login(const std::string& username, | 70 virtual void Login(const std::string& username, |
67 const std::string& password) OVERRIDE; | 71 const std::string& password) OVERRIDE; |
68 virtual void LoginAsGuest() OVERRIDE; | 72 virtual void LoginAsGuest() OVERRIDE; |
69 | 73 |
70 private: | 74 private: |
71 // Singleton implementation: | 75 // Singleton implementation: |
72 friend struct DefaultSingletonTraits<DOMLoginDisplay>; | 76 friend struct DefaultSingletonTraits<DOMLoginDisplay>; |
73 DOMLoginDisplay(); | 77 DOMLoginDisplay(); |
74 | 78 |
75 // Set of Users in the systemvisible UserControllers. | 79 // Set of Users in the systemvisible UserControllers. |
76 std::vector<UserManager::User> users_; | 80 std::vector<UserManager::User> users_; |
77 | 81 |
78 // Container of the screen we are displaying | 82 // Container of the screen we are displaying |
79 DOMBrowser* login_screen_; | 83 WebUILoginView* webui_login_view_; |
oshima
2011/05/19 01:45:19
// owned by webui_login_window_
rharrison
2011/05/19 16:45:28
Done.
| |
84 views::Widget* webui_login_window_; | |
80 | 85 |
81 DISALLOW_COPY_AND_ASSIGN(DOMLoginDisplay); | 86 DISALLOW_COPY_AND_ASSIGN(DOMLoginDisplay); |
82 }; | 87 }; |
83 | 88 |
84 } // namespace chromeos | 89 } // namespace chromeos |
85 | 90 |
86 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_DOM_LOGIN_DISPLAY_H_ | 91 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_DOM_LOGIN_DISPLAY_H_ |
OLD | NEW |