| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/chromeos/login/screens/host_pairing_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/host_pairing_screen.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/chromeos/login/wizard_controller.h" | 8 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 9 #include "components/pairing/host_pairing_controller.h" | 9 #include "components/pairing/host_pairing_controller.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace chromeos { |
| 12 | 12 |
| 13 using namespace host_pairing; | 13 using namespace host_pairing; |
| 14 using namespace pairing_chromeos; | 14 using namespace pairing_chromeos; |
| 15 | 15 |
| 16 HostPairingScreen::HostPairingScreen( | 16 HostPairingScreen::HostPairingScreen( |
| 17 ScreenObserver* observer, | 17 BaseScreenDelegate* base_screen_delegate, |
| 18 HostPairingScreenActor* actor, | 18 HostPairingScreenActor* actor, |
| 19 pairing_chromeos::HostPairingController* remora_controller) | 19 pairing_chromeos::HostPairingController* remora_controller) |
| 20 : BaseScreen(observer), | 20 : BaseScreen(base_screen_delegate), |
| 21 actor_(actor), | 21 actor_(actor), |
| 22 remora_controller_(remora_controller), | 22 remora_controller_(remora_controller), |
| 23 delegate_(nullptr), | 23 delegate_(nullptr), |
| 24 current_stage_(HostPairingController::STAGE_NONE) { | 24 current_stage_(HostPairingController::STAGE_NONE) { |
| 25 actor_->SetDelegate(this); | 25 actor_->SetDelegate(this); |
| 26 remora_controller_->AddObserver(this); | 26 remora_controller_->AddObserver(this); |
| 27 } | 27 } |
| 28 | 28 |
| 29 HostPairingScreen::~HostPairingScreen() { | 29 HostPairingScreen::~HostPairingScreen() { |
| 30 if (actor_) | 30 if (actor_) |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 const std::string& keyboard_layout) { | 94 const std::string& keyboard_layout) { |
| 95 VLOG(1) << "ConfigureHostMessage language=" << lang | 95 VLOG(1) << "ConfigureHostMessage language=" << lang |
| 96 << ", timezone=" << timezone | 96 << ", timezone=" << timezone |
| 97 << ", keyboard_layout=" << keyboard_layout; | 97 << ", keyboard_layout=" << keyboard_layout; |
| 98 | 98 |
| 99 remora_controller_->RemoveObserver(this); | 99 remora_controller_->RemoveObserver(this); |
| 100 if (delegate_) { | 100 if (delegate_) { |
| 101 delegate_->ConfigureHost( | 101 delegate_->ConfigureHost( |
| 102 accepted_eula, lang, timezone, send_reports, keyboard_layout); | 102 accepted_eula, lang, timezone, send_reports, keyboard_layout); |
| 103 } | 103 } |
| 104 get_screen_observer()->OnExit(WizardController::HOST_PAIRING_FINISHED); | 104 get_base_screen_delegate()->OnExit(WizardController::HOST_PAIRING_FINISHED); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void HostPairingScreen::EnrollHost(const std::string& auth_token) { | 107 void HostPairingScreen::EnrollHost(const std::string& auth_token) { |
| 108 NOTREACHED(); | 108 NOTREACHED(); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void HostPairingScreen::OnActorDestroyed(HostPairingScreenActor* actor) { | 111 void HostPairingScreen::OnActorDestroyed(HostPairingScreenActor* actor) { |
| 112 if (actor_ == actor) | 112 if (actor_ == actor) |
| 113 actor_ = NULL; | 113 actor_ = NULL; |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace chromeos | 116 } // namespace chromeos |
| OLD | NEW |