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