| 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_ENTERPRISE_ENROLLMENT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class EnterpriseEnrollmentController; | 27 class EnterpriseEnrollmentController; |
| 28 class ScreenObserver; | 28 class ScreenObserver; |
| 29 | 29 |
| 30 // Implements the UI for the enterprise enrollment screen in OOBE. | 30 // Implements the UI for the enterprise enrollment screen in OOBE. |
| 31 class EnterpriseEnrollmentView : public views::View, | 31 class EnterpriseEnrollmentView : public views::View, |
| 32 public EnterpriseEnrollmentUI::Controller { | 32 public EnterpriseEnrollmentUI::Controller { |
| 33 public: | 33 public: |
| 34 explicit EnterpriseEnrollmentView(EnterpriseEnrollmentController* controller); | 34 explicit EnterpriseEnrollmentView(EnterpriseEnrollmentController* controller); |
| 35 virtual ~EnterpriseEnrollmentView(); | 35 virtual ~EnterpriseEnrollmentView(); |
| 36 | 36 |
| 37 void set_editable_user(bool editable); |
| 38 |
| 37 // Initialize view controls and layout. | 39 // Initialize view controls and layout. |
| 38 void Init(); | 40 void Init(); |
| 39 | 41 |
| 40 // Switches to the confirmation screen. | 42 // Switches to the confirmation screen. |
| 41 void ShowConfirmationScreen(); | 43 void ShowConfirmationScreen(); |
| 42 | 44 |
| 43 // Show an authentication error. | 45 // Show an authentication error. |
| 44 void ShowAuthError(const GoogleServiceAuthError& error); | 46 void ShowAuthError(const GoogleServiceAuthError& error); |
| 45 void ShowAccountError(); | 47 void ShowAccountError(); |
| 46 void ShowFatalAuthError(); | 48 void ShowFatalAuthError(); |
| 47 void ShowFatalEnrollmentError(); | 49 void ShowFatalEnrollmentError(); |
| 48 void ShowNetworkEnrollmentError(); | 50 void ShowNetworkEnrollmentError(); |
| 49 | 51 |
| 50 // EnterpriseEnrollmentUI::Controller implementation. | 52 // EnterpriseEnrollmentUI::Controller implementation. |
| 51 virtual void OnAuthSubmitted(const std::string& user, | 53 virtual void OnAuthSubmitted(const std::string& user, |
| 52 const std::string& password, | 54 const std::string& password, |
| 53 const std::string& captcha, | 55 const std::string& captcha, |
| 54 const std::string& access_code) OVERRIDE; | 56 const std::string& access_code) OVERRIDE; |
| 55 virtual void OnAuthCancelled() OVERRIDE; | 57 virtual void OnAuthCancelled() OVERRIDE; |
| 56 virtual void OnConfirmationClosed() OVERRIDE; | 58 virtual void OnConfirmationClosed() OVERRIDE; |
| 59 virtual bool GetInitialUser(std::string* user) OVERRIDE; |
| 57 | 60 |
| 58 private: | 61 private: |
| 59 // Updates the gaia login box. | 62 // Updates the gaia login box. |
| 60 void UpdateGaiaLogin(const DictionaryValue& args); | 63 void UpdateGaiaLogin(const DictionaryValue& args); |
| 61 | 64 |
| 62 // Display the given i18n string as error message. | 65 // Display the given i18n string as error message. |
| 63 void ShowError(int message_id); | 66 void ShowError(int message_id); |
| 64 | 67 |
| 65 // Overriden from views::View: | 68 // Overriden from views::View: |
| 66 virtual void Layout() OVERRIDE; | 69 virtual void Layout() OVERRIDE; |
| 67 | 70 |
| 68 EnterpriseEnrollmentController* controller_; | 71 EnterpriseEnrollmentController* controller_; |
| 69 | 72 |
| 70 // Controls. | 73 // Controls. |
| 71 WebPageDomView* enrollment_page_view_; | 74 WebPageDomView* enrollment_page_view_; |
| 72 | 75 |
| 76 bool editable_user_; |
| 77 |
| 73 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentView); | 78 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentView); |
| 74 }; | 79 }; |
| 75 | 80 |
| 76 } // namespace chromeos | 81 } // namespace chromeos |
| 77 | 82 |
| 78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_VIEW_H_ | 83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENTERPRISE_ENROLLMENT_VIEW_H_ |
| OLD | NEW |