| 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 #include "chrome/browser/chromeos/login/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 | 164 |
| 165 WizardController::~WizardController() { | 165 WizardController::~WizardController() { |
| 166 if (default_controller_ == this) { | 166 if (default_controller_ == this) { |
| 167 default_controller_ = NULL; | 167 default_controller_ = NULL; |
| 168 } else { | 168 } else { |
| 169 NOTREACHED() << "More than one controller are alive."; | 169 NOTREACHED() << "More than one controller are alive."; |
| 170 } | 170 } |
| 171 } | 171 } |
| 172 | 172 |
| 173 void WizardController::Init(const std::string& first_screen_name, | 173 void WizardController::Init( |
| 174 base::DictionaryValue* screen_parameters) { | 174 const std::string& first_screen_name, |
| 175 scoped_ptr<base::DictionaryValue> screen_parameters) { |
| 175 VLOG(1) << "Starting OOBE wizard with screen: " << first_screen_name; | 176 VLOG(1) << "Starting OOBE wizard with screen: " << first_screen_name; |
| 176 first_screen_name_ = first_screen_name; | 177 first_screen_name_ = first_screen_name; |
| 177 screen_parameters_.reset(screen_parameters); | 178 screen_parameters_ = screen_parameters.Pass(); |
| 178 | 179 |
| 179 bool oobe_complete = StartupUtils::IsOobeCompleted(); | 180 bool oobe_complete = StartupUtils::IsOobeCompleted(); |
| 180 if (!oobe_complete || first_screen_name == kOutOfBoxScreenName) { | 181 if (!oobe_complete || first_screen_name == kOutOfBoxScreenName) { |
| 181 is_out_of_box_ = true; | 182 is_out_of_box_ = true; |
| 182 } | 183 } |
| 183 | 184 |
| 184 AdvanceToScreen(first_screen_name); | 185 AdvanceToScreen(first_screen_name); |
| 185 content::NotificationService::current()->Notify( | 186 content::NotificationService::current()->Notify( |
| 186 chrome::NOTIFICATION_WIZARD_FIRST_SCREEN_SHOWN, | 187 chrome::NOTIFICATION_WIZARD_FIRST_SCREEN_SHOWN, |
| 187 content::NotificationService::AllSources(), | 188 content::NotificationService::AllSources(), |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 return zero_delay_enabled_; | 762 return zero_delay_enabled_; |
| 762 } | 763 } |
| 763 | 764 |
| 764 // static | 765 // static |
| 765 void WizardController::SetZeroDelays() { | 766 void WizardController::SetZeroDelays() { |
| 766 kShowDelayMs = 0; | 767 kShowDelayMs = 0; |
| 767 zero_delay_enabled_ = true; | 768 zero_delay_enabled_ = true; |
| 768 } | 769 } |
| 769 | 770 |
| 770 } // namespace chromeos | 771 } // namespace chromeos |
| OLD | NEW |