| 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_EXISTING_USER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 public: | 48 public: |
| 49 // All UI initialization is deferred till Init() call. | 49 // All UI initialization is deferred till Init() call. |
| 50 explicit ExistingUserController(LoginDisplayHost* host); | 50 explicit ExistingUserController(LoginDisplayHost* host); |
| 51 ~ExistingUserController(); | 51 ~ExistingUserController(); |
| 52 | 52 |
| 53 // Returns the current existing user controller if it has been created. | 53 // Returns the current existing user controller if it has been created. |
| 54 static ExistingUserController* current_controller() { | 54 static ExistingUserController* current_controller() { |
| 55 return current_controller_; | 55 return current_controller_; |
| 56 } | 56 } |
| 57 | 57 |
| 58 void set_initial_start_page(const std::string& url) { | |
| 59 initial_start_page_ = url; | |
| 60 } | |
| 61 | |
| 62 // Creates and shows login UI for known users. | 58 // Creates and shows login UI for known users. |
| 63 void Init(const UserVector& users); | 59 void Init(const UserVector& users); |
| 64 | 60 |
| 65 // LoginDisplay::Delegate: implementation | 61 // LoginDisplay::Delegate: implementation |
| 66 virtual void CreateAccount() OVERRIDE; | 62 virtual void CreateAccount() OVERRIDE; |
| 67 virtual string16 GetConnectedNetworkName() OVERRIDE; | 63 virtual string16 GetConnectedNetworkName() OVERRIDE; |
| 68 virtual void FixCaptivePortal() OVERRIDE; | 64 virtual void FixCaptivePortal() OVERRIDE; |
| 69 virtual void Login(const std::string& username, | 65 virtual void Login(const std::string& username, |
| 70 const std::string& password) OVERRIDE; | 66 const std::string& password) OVERRIDE; |
| 71 virtual void LoginAsGuest() OVERRIDE; | 67 virtual void LoginAsGuest() OVERRIDE; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // Pointer to the current instance of the controller to be used by | 148 // Pointer to the current instance of the controller to be used by |
| 153 // automation tests. | 149 // automation tests. |
| 154 static ExistingUserController* current_controller_; | 150 static ExistingUserController* current_controller_; |
| 155 | 151 |
| 156 // Triggers prefetching of user settings. | 152 // Triggers prefetching of user settings. |
| 157 scoped_ptr<UserCrosSettingsProvider> user_settings_; | 153 scoped_ptr<UserCrosSettingsProvider> user_settings_; |
| 158 | 154 |
| 159 // URL to append to start Guest mode with. | 155 // URL to append to start Guest mode with. |
| 160 GURL guest_mode_url_; | 156 GURL guest_mode_url_; |
| 161 | 157 |
| 162 // URL to open on first owner login from OEM customization manifest. | |
| 163 std::string initial_start_page_; | |
| 164 | |
| 165 // Used for user image changed notifications. | 158 // Used for user image changed notifications. |
| 166 NotificationRegistrar registrar_; | 159 NotificationRegistrar registrar_; |
| 167 | 160 |
| 168 // Factory of callbacks. | 161 // Factory of callbacks. |
| 169 ScopedRunnableMethodFactory<ExistingUserController> method_factory_; | 162 ScopedRunnableMethodFactory<ExistingUserController> method_factory_; |
| 170 | 163 |
| 171 // Whether everything is ready to launch the browser. | 164 // Whether everything is ready to launch the browser. |
| 172 bool ready_for_browser_launch_; | 165 bool ready_for_browser_launch_; |
| 173 | 166 |
| 174 // Whether two factor credentials were used. | 167 // Whether two factor credentials were used. |
| 175 bool two_factor_credentials_; | 168 bool two_factor_credentials_; |
| 176 | 169 |
| 177 // Used to verify ownership before starting enterprise enrollment. | 170 // Used to verify ownership before starting enterprise enrollment. |
| 178 scoped_ptr<OwnershipStatusChecker> ownership_checker_; | 171 scoped_ptr<OwnershipStatusChecker> ownership_checker_; |
| 179 | 172 |
| 180 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, NewUserLogin); | 173 FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, NewUserLogin); |
| 181 | 174 |
| 182 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); | 175 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); |
| 183 }; | 176 }; |
| 184 | 177 |
| 185 } // namespace chromeos | 178 } // namespace chromeos |
| 186 | 179 |
| 187 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ | 180 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ |
| OLD | NEW |