| 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_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h" | 9 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h" |
| 10 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 10 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 11 #include "content/browser/webui/web_ui.h" | 11 #include "content/browser/webui/web_ui.h" |
| 12 | 12 |
| 13 namespace base { |
| 14 class DictionaryValue; |
| 13 class ListValue; | 15 class ListValue; |
| 16 } |
| 14 | 17 |
| 15 namespace chromeos { | 18 namespace chromeos { |
| 16 | 19 |
| 17 // Signin screen handler. | 20 // Signin screen handler. |
| 18 class SigninScreenHandler : public OobeMessageHandler, | 21 class SigninScreenHandler : public OobeMessageHandler, |
| 19 public BaseLoginUIHandler { | 22 public BaseLoginUIHandler { |
| 20 public: | 23 public: |
| 21 SigninScreenHandler(); | 24 SigninScreenHandler(); |
| 22 | 25 |
| 23 // Shows the sign in screen. | 26 // Shows the sign in screen. |
| 24 void Show(); | 27 void Show(); |
| 25 | 28 |
| 26 private: | 29 private: |
| 27 // OobeMessageHandler implementation: | 30 // OobeMessageHandler implementation: |
| 28 virtual void GetLocalizedStrings(DictionaryValue* localized_strings) OVERRIDE; | 31 virtual void GetLocalizedStrings( |
| 32 base::DictionaryValue* localized_strings) OVERRIDE; |
| 29 virtual void Initialize() OVERRIDE; | 33 virtual void Initialize() OVERRIDE; |
| 30 | 34 |
| 31 // WebUIMessageHandler implementation: | 35 // WebUIMessageHandler implementation: |
| 32 virtual void RegisterMessages() OVERRIDE; | 36 virtual void RegisterMessages() OVERRIDE; |
| 33 | 37 |
| 34 // BaseLoginUIHandler implementation. | 38 // BaseLoginUIHandler implementation. |
| 35 virtual void ClearAndEnablePassword() OVERRIDE; | 39 virtual void ClearAndEnablePassword() OVERRIDE; |
| 36 virtual void ShowError(const std::string& error_text, | 40 virtual void ShowError(const std::string& error_text, |
| 37 const std::string& help_link_text, | 41 const std::string& help_link_text, |
| 38 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; | 42 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; |
| 39 | 43 |
| 40 // Handles authenticate user request from javascript. | 44 // Handles authenticate user request from javascript. |
| 41 void HandleAuthenticateUser(const ListValue* args); | 45 void HandleAuthenticateUser(const base::ListValue* args); |
| 42 | 46 |
| 43 // A delegate that glues this handler with backend LoginDisplay. | 47 // A delegate that glues this handler with backend LoginDisplay. |
| 44 LoginUIHandlerDelegate* delegate_; | 48 LoginUIHandlerDelegate* delegate_; |
| 45 | 49 |
| 46 // Keeps whether screen should be shown right after initialization. | 50 // Keeps whether screen should be shown right after initialization. |
| 47 bool show_on_init_; | 51 bool show_on_init_; |
| 48 | 52 |
| 49 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 53 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
| 50 }; | 54 }; |
| 51 | 55 |
| 52 } // namespae chromeoc | 56 } // namespae chromeoc |
| 53 | 57 |
| 54 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 58 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
| OLD | NEW |