| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/first_run/first_run_controller.h" | 5 #include "chrome/browser/chromeos/first_run/first_run_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 void FirstRunController::OnNextButtonClicked(const std::string& step_name) { | 118 void FirstRunController::OnNextButtonClicked(const std::string& step_name) { |
| 119 DCHECK(GetCurrentStep() && GetCurrentStep()->name() == step_name); | 119 DCHECK(GetCurrentStep() && GetCurrentStep()->name() == step_name); |
| 120 GetCurrentStep()->OnBeforeHide(); | 120 GetCurrentStep()->OnBeforeHide(); |
| 121 actor_->HideCurrentStep(); | 121 actor_->HideCurrentStep(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void FirstRunController::OnHelpButtonClicked() { | 124 void FirstRunController::OnHelpButtonClicked() { |
| 125 RecordCompletion(first_run::TUTORIAL_COMPLETED_WITH_KEEP_EXPLORING); | 125 RecordCompletion(first_run::TUTORIAL_COMPLETED_WITH_KEEP_EXPLORING); |
| 126 on_actor_finalized_ = base::Bind(chrome::ShowHelpForProfile, | 126 on_actor_finalized_ = base::Bind(chrome::ShowHelpForProfile, user_profile_, |
| 127 user_profile_, | |
| 128 chrome::HOST_DESKTOP_TYPE_ASH, | |
| 129 chrome::HELP_SOURCE_MENU); | 127 chrome::HELP_SOURCE_MENU); |
| 130 actor_->Finalize(); | 128 actor_->Finalize(); |
| 131 } | 129 } |
| 132 | 130 |
| 133 void FirstRunController::OnStepHidden(const std::string& step_name) { | 131 void FirstRunController::OnStepHidden(const std::string& step_name) { |
| 134 DCHECK(GetCurrentStep() && GetCurrentStep()->name() == step_name); | 132 DCHECK(GetCurrentStep() && GetCurrentStep()->name() == step_name); |
| 135 GetCurrentStep()->OnAfterHide(); | 133 GetCurrentStep()->OnAfterHide(); |
| 136 if (!actor_->IsFinalizing()) | 134 if (!actor_->IsFinalizing()) |
| 137 ShowNextStep(); | 135 ShowNextStep(); |
| 138 } | 136 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 current_step_index_ = NONE_STEP_INDEX; | 185 current_step_index_ = NONE_STEP_INDEX; |
| 188 } | 186 } |
| 189 | 187 |
| 190 first_run::Step* FirstRunController::GetCurrentStep() const { | 188 first_run::Step* FirstRunController::GetCurrentStep() const { |
| 191 return current_step_index_ != NONE_STEP_INDEX ? | 189 return current_step_index_ != NONE_STEP_INDEX ? |
| 192 steps_[current_step_index_].get() : NULL; | 190 steps_[current_step_index_].get() : NULL; |
| 193 } | 191 } |
| 194 | 192 |
| 195 } // namespace chromeos | 193 } // namespace chromeos |
| 196 | 194 |
| OLD | NEW |