| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return WizardController::kControllerPairingScreenName; | 68 return WizardController::kControllerPairingScreenName; |
| 69 } | 69 } |
| 70 | 70 |
| 71 void ControllerPairingScreen::PairingStageChanged(Stage new_stage) { | 71 void ControllerPairingScreen::PairingStageChanged(Stage new_stage) { |
| 72 DCHECK(new_stage != current_stage_); | 72 DCHECK(new_stage != current_stage_); |
| 73 | 73 |
| 74 std::string desired_page; | 74 std::string desired_page; |
| 75 switch (new_stage) { | 75 switch (new_stage) { |
| 76 case ControllerPairingController::STAGE_DEVICES_DISCOVERY: { | 76 case ControllerPairingController::STAGE_DEVICES_DISCOVERY: { |
| 77 desired_page = kPageDevicesDiscovery; | 77 desired_page = kPageDevicesDiscovery; |
| 78 context_.SetStringList(kContextKeyDevices, StringList()); | 78 context_.SetStringList(kContextKeyDevices, ::login::StringList()); |
| 79 context_.SetString(kContextKeySelectedDevice, std::string()); | 79 context_.SetString(kContextKeySelectedDevice, std::string()); |
| 80 device_preselected_ = false; | 80 device_preselected_ = false; |
| 81 break; | 81 break; |
| 82 } | 82 } |
| 83 case ControllerPairingController::STAGE_DEVICE_NOT_FOUND: { | 83 case ControllerPairingController::STAGE_DEVICE_NOT_FOUND: { |
| 84 desired_page = kPageDeviceNotFound; | 84 desired_page = kPageDeviceNotFound; |
| 85 break; | 85 break; |
| 86 } | 86 } |
| 87 case ControllerPairingController::STAGE_ESTABLISHING_CONNECTION: { | 87 case ControllerPairingController::STAGE_ESTABLISHING_CONNECTION: { |
| 88 desired_page = kPageEstablishingConnection; | 88 desired_page = kPageEstablishingConnection; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 ++key) { | 208 ++key) { |
| 209 if (*key == kContextKeySelectedDevice) { | 209 if (*key == kContextKeySelectedDevice) { |
| 210 context_.SetBoolean(kContextKeyControlsDisabled, | 210 context_.SetBoolean(kContextKeyControlsDisabled, |
| 211 context_.GetString(*key).empty()); | 211 context_.GetString(*key).empty()); |
| 212 CommitContextChanges(); | 212 CommitContextChanges(); |
| 213 } | 213 } |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace chromeos | 217 } // namespace chromeos |
| OLD | NEW |