| 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_WEBUI_LOGIN_DISPLAY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
| 14 #include "chrome/browser/chromeos/login/login_display.h" | 14 #include "chrome/browser/chromeos/login/login_display.h" |
| 15 #include "chrome/browser/chromeos/login/user_manager.h" | 15 #include "chrome/browser/chromeos/login/user_manager.h" |
| 16 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h" | 16 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 17 #include "views/widget/widget.h" | 17 #include "views/widget/widget.h" |
| 18 | 18 |
| 19 namespace gfx { | 19 namespace gfx { |
| 20 class Rect; | 20 class Rect; |
| 21 } // namespace gfx | 21 } // namespace gfx |
| 22 | 22 |
| 23 namespace chromeos { | 23 namespace chromeos { |
| 24 // WebUI-based login UI implementation. | 24 // WebUI-based login UI implementation. |
| 25 // This class is a Singleton. It allows the LoginDisplayHost and LoginUIHandler | 25 // This class is a Singleton. It allows the LoginDisplayHost and LoginUIHandler |
| 26 // to access it without having to be coupled with each other. It is created with | 26 // to access it without having to be coupled with each other. It is created with |
| 27 // NULL for the delegate and a 0-size rectangle for the background | 27 // NULL for the delegate and a 0-size rectangle for the background |
| 28 // bounds. Before use these values should be set to a sane value. When done with | 28 // bounds. Before use these values should be set to a sane value. When done with |
| 29 // the object, the ExistingUserController should call Destroy and not free the | 29 // the object, the ExistingUserController should call Destroy and not free the |
| 30 // pointer, where as accessing classes should do nothing with the pointer. | 30 // pointer, where as accessing classes should do nothing with the pointer. |
| 31 // | 31 // |
| 32 // Expected order of commands to setup for LoginDisplayHost: | 32 // Expected order of commands to setup for LoginDisplayHost: |
| 33 // WebUILoginDisplay::GetInstance(); | 33 // WebUILoginDisplay::GetInstance(); |
| 34 // set_delegate(delegate); | 34 // set_delegate(delegate); |
| 35 // set_background_bounds(background_bounds()); | 35 // set_background_bounds(background_bounds()); |
| 36 // Init(); | 36 // Init(); |
| 37 // | 37 // |
| 38 // Expected order of commands to setup for LoginUIHandler: | 38 // Expected order of commands to setup for LoginUIHandler: |
| 39 // WebUILoginDisplay::GetInstance(); | 39 // WebUILoginDisplay::GetInstance(); |
| 40 // set_login_handler(this); | 40 // set_login_handler(this); |
| 41 | 41 |
| 42 class WebUILoginDisplay : public LoginDisplay, | 42 class WebUILoginDisplay : public LoginDisplay, |
| 43 public LoginUIHandlerDelegate { | 43 public SigninScreenHandlerDelegate { |
| 44 public: | 44 public: |
| 45 virtual ~WebUILoginDisplay(); | 45 virtual ~WebUILoginDisplay(); |
| 46 | 46 |
| 47 // Singleton implementation: | 47 // Singleton implementation: |
| 48 static WebUILoginDisplay* GetInstance(); | 48 static WebUILoginDisplay* GetInstance(); |
| 49 | 49 |
| 50 // Wrapper used to help in routing keyboard key presses into the login | 50 // Wrapper used to help in routing keyboard key presses into the login |
| 51 // screen. This gets the Login Window widget from the Singleton, so that other | 51 // screen. This gets the Login Window widget from the Singleton, so that other |
| 52 // classes don't need to know we are a Singleton | 52 // classes don't need to know we are a Singleton |
| 53 static views::Widget* GetLoginWindow(); | 53 static views::Widget* GetLoginWindow(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // Container of the screen we are displaying | 88 // Container of the screen we are displaying |
| 89 views::Widget* login_window_; | 89 views::Widget* login_window_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); | 91 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplay); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace chromeos | 94 } // namespace chromeos |
| 95 | 95 |
| 96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ | 96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_H_ |
| OLD | NEW |