| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WIZARD_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 // Called from SimpleGeolocationProvider when location is resolved. | 304 // Called from SimpleGeolocationProvider when location is resolved. |
| 305 void OnLocationResolved(const Geoposition& position, | 305 void OnLocationResolved(const Geoposition& position, |
| 306 bool server_error, | 306 bool server_error, |
| 307 const base::TimeDelta elapsed); | 307 const base::TimeDelta elapsed); |
| 308 | 308 |
| 309 // Returns true if callback has been installed. | 309 // Returns true if callback has been installed. |
| 310 // Returns false if timezone has already been resolved. | 310 // Returns false if timezone has already been resolved. |
| 311 bool SetOnTimeZoneResolvedForTesting(const base::Closure& callback); | 311 bool SetOnTimeZoneResolvedForTesting(const base::Closure& callback); |
| 312 | 312 |
| 313 // Returns true if kHostPairingOobe perf has been set. If it's set, launch the | 313 // Returns true for pairing remora OOBE. |
| 314 // pairing remora OOBE from the beginning no matter an eligible controller is | |
| 315 // detected or not. | |
| 316 bool IsRemoraPairingOobe() const; | 314 bool IsRemoraPairingOobe() const; |
| 317 | 315 |
| 316 // Returns true for pairing slave OOBE. |
| 317 bool IsSlavePairingOobe() const; |
| 318 |
| 318 // Starts listening for an incoming shark controller connection, if we are | 319 // Starts listening for an incoming shark controller connection, if we are |
| 319 // running remora OOBE. | 320 // running remora OOBE. |
| 320 void MaybeStartListeningForSharkConnection(); | 321 void MaybeStartListeningForSharkConnection(); |
| 321 | 322 |
| 322 // Called when a connection to controller has been established. Wizard | 323 // Called when a connection to controller has been established. Wizard |
| 323 // controller takes the ownership of |pairing_controller| after that call. | 324 // controller takes the ownership of |pairing_controller| after that call. |
| 324 void OnSharkConnected( | 325 void OnSharkConnected( |
| 325 scoped_ptr<pairing_chromeos::HostPairingController> pairing_controller); | 326 scoped_ptr<pairing_chromeos::HostPairingController> pairing_controller); |
| 326 | 327 |
| 327 // Callback function for AddNetworkRequested(). | 328 // Callback function for AddNetworkRequested(). |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 // Pairing controller for remora devices. | 422 // Pairing controller for remora devices. |
| 422 scoped_ptr<pairing_chromeos::HostPairingController> remora_controller_; | 423 scoped_ptr<pairing_chromeos::HostPairingController> remora_controller_; |
| 423 | 424 |
| 424 // Maps screen ids to last time of their shows. | 425 // Maps screen ids to last time of their shows. |
| 425 base::hash_map<std::string, base::Time> screen_show_times_; | 426 base::hash_map<std::string, base::Time> screen_show_times_; |
| 426 | 427 |
| 427 // Tests check result of timezone resolve. | 428 // Tests check result of timezone resolve. |
| 428 bool timezone_resolved_ = false; | 429 bool timezone_resolved_ = false; |
| 429 base::Closure on_timezone_resolved_for_testing_; | 430 base::Closure on_timezone_resolved_for_testing_; |
| 430 | 431 |
| 432 // True if shark device initiated connection to this device. |
| 433 bool shark_controller_detected_ = false; |
| 434 |
| 431 // Listens for incoming connection from a shark controller if a regular (not | 435 // Listens for incoming connection from a shark controller if a regular (not |
| 432 // pairing) remora OOBE is active. If connection is established, wizard | 436 // pairing) remora OOBE is active. If connection is established, wizard |
| 433 // conroller swithces to a pairing OOBE. | 437 // conroller swithces to a pairing OOBE. |
| 434 scoped_ptr<pairing_chromeos::SharkConnectionListener> | 438 scoped_ptr<pairing_chromeos::SharkConnectionListener> |
| 435 shark_connection_listener_; | 439 shark_connection_listener_; |
| 436 | 440 |
| 437 BaseScreen* hid_screen_ = nullptr; | 441 BaseScreen* hid_screen_ = nullptr; |
| 438 | 442 |
| 439 base::WeakPtrFactory<WizardController> weak_factory_; | 443 base::WeakPtrFactory<WizardController> weak_factory_; |
| 440 | 444 |
| 441 DISALLOW_COPY_AND_ASSIGN(WizardController); | 445 DISALLOW_COPY_AND_ASSIGN(WizardController); |
| 442 }; | 446 }; |
| 443 | 447 |
| 444 } // namespace chromeos | 448 } // namespace chromeos |
| 445 | 449 |
| 446 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 450 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| OLD | NEW |