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/controller_pairing_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/controller_pairing_screen.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/chromeos/login/wizard_controller.h" | 9 #include "chrome/browser/chromeos/login/wizard_controller.h" |
10 #include "google_apis/gaia/gaia_auth_util.h" | 10 #include "google_apis/gaia/gaia_auth_util.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 desired_page = kPageHostConnectionLost; | 106 desired_page = kPageHostConnectionLost; |
107 break; | 107 break; |
108 } | 108 } |
109 case ControllerPairingController::STAGE_WAITING_FOR_CREDENTIALS: { | 109 case ControllerPairingController::STAGE_WAITING_FOR_CREDENTIALS: { |
110 shark_controller_->RemoveObserver(this); | 110 shark_controller_->RemoveObserver(this); |
111 get_screen_observer()->OnExit( | 111 get_screen_observer()->OnExit( |
112 WizardController::CONTROLLER_PAIRING_FINISHED); | 112 WizardController::CONTROLLER_PAIRING_FINISHED); |
113 desired_page = kPageEnrollmentIntroduction; | 113 desired_page = kPageEnrollmentIntroduction; |
114 break; | 114 break; |
115 } | 115 } |
| 116 case ControllerPairingController::STAGE_INITIALIZATION_ERROR: { |
| 117 // TODO(achuith, dzhioev, zork): Handle this better. |
| 118 LOG(WARNING) << "Bluetooth initialization error"; |
| 119 break; |
| 120 } |
116 default: | 121 default: |
117 NOTREACHED(); | 122 NOTREACHED(); |
118 } | 123 } |
119 current_stage_ = new_stage; | 124 current_stage_ = new_stage; |
120 context_.SetString(kContextKeyPage, desired_page); | 125 context_.SetString(kContextKeyPage, desired_page); |
121 context_.SetBoolean(kContextKeyControlsDisabled, false); | 126 context_.SetBoolean(kContextKeyControlsDisabled, false); |
122 CommitContextChanges(); | 127 CommitContextChanges(); |
123 VLOG(1) << "PairingStageChanged " << desired_page | 128 VLOG(1) << "PairingStageChanged " << desired_page |
124 << ", current stage " << current_stage_; | 129 << ", current stage " << current_stage_; |
125 } | 130 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 ++key) { | 204 ++key) { |
200 if (*key == kContextKeySelectedDevice) { | 205 if (*key == kContextKeySelectedDevice) { |
201 context_.SetBoolean(kContextKeyControlsDisabled, | 206 context_.SetBoolean(kContextKeyControlsDisabled, |
202 context_.GetString(*key).empty()); | 207 context_.GetString(*key).empty()); |
203 CommitContextChanges(); | 208 CommitContextChanges(); |
204 } | 209 } |
205 } | 210 } |
206 } | 211 } |
207 | 212 |
208 } // namespace chromeos | 213 } // namespace chromeos |
OLD | NEW |