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, user_profile_, | 126 on_actor_finalized_ = |
127 chrome::HELP_SOURCE_MENU); | 127 base::Bind(chrome::ShowHelpForProfile, user_profile_, |
| 128 chrome::HOST_DESKTOP_TYPE_ASH, chrome::HELP_SOURCE_MENU); |
128 actor_->Finalize(); | 129 actor_->Finalize(); |
129 } | 130 } |
130 | 131 |
131 void FirstRunController::OnStepHidden(const std::string& step_name) { | 132 void FirstRunController::OnStepHidden(const std::string& step_name) { |
132 DCHECK(GetCurrentStep() && GetCurrentStep()->name() == step_name); | 133 DCHECK(GetCurrentStep() && GetCurrentStep()->name() == step_name); |
133 GetCurrentStep()->OnAfterHide(); | 134 GetCurrentStep()->OnAfterHide(); |
134 if (!actor_->IsFinalizing()) | 135 if (!actor_->IsFinalizing()) |
135 ShowNextStep(); | 136 ShowNextStep(); |
136 } | 137 } |
137 | 138 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 current_step_index_ = NONE_STEP_INDEX; | 186 current_step_index_ = NONE_STEP_INDEX; |
186 } | 187 } |
187 | 188 |
188 first_run::Step* FirstRunController::GetCurrentStep() const { | 189 first_run::Step* FirstRunController::GetCurrentStep() const { |
189 return current_step_index_ != NONE_STEP_INDEX ? | 190 return current_step_index_ != NONE_STEP_INDEX ? |
190 steps_[current_step_index_].get() : NULL; | 191 steps_[current_step_index_].get() : NULL; |
191 } | 192 } |
192 | 193 |
193 } // namespace chromeos | 194 } // namespace chromeos |
194 | 195 |
OLD | NEW |