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