| 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/steps/help_step.h" | 5 #include "chrome/browser/chromeos/first_run/steps/help_step.h" |
| 6 | 6 |
| 7 #include "ash/first_run/first_run_helper.h" | 7 #include "ash/first_run/first_run_helper.h" |
| 8 #include "chrome/browser/chromeos/first_run/step_names.h" | 8 #include "chrome/browser/chromeos/first_run/step_names.h" |
| 9 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h" | 9 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 const int kCircleRadius = 19; | 14 const int kCircleRadius = 19; |
| 15 | 15 |
| 16 } // namespace | 16 } // namespace |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 namespace first_run { | 19 namespace first_run { |
| 20 | 20 |
| 21 HelpStep::HelpStep(ash::FirstRunHelper* shell_helper, FirstRunActor* actor) | 21 HelpStep::HelpStep(ash::FirstRunHelper* shell_helper, FirstRunActor* actor) |
| 22 : Step(kHelpStep, shell_helper, actor) { | 22 : Step(kHelpStep, shell_helper, actor) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void HelpStep::Show() { | 25 void HelpStep::DoShow() { |
| 26 if (!shell_helper()->IsTrayBubbleOpened()) | 26 if (!shell_helper()->IsTrayBubbleOpened()) |
| 27 shell_helper()->OpenTrayBubble(); | 27 shell_helper()->OpenTrayBubble(); |
| 28 gfx::Rect button_bounds = shell_helper()->GetHelpButtonBounds(); | 28 gfx::Rect button_bounds = shell_helper()->GetHelpButtonBounds(); |
| 29 gfx::Point center = button_bounds.CenterPoint(); | 29 gfx::Point center = button_bounds.CenterPoint(); |
| 30 actor()->AddRoundHole(center.x(), center.y(), kCircleRadius); | 30 actor()->AddRoundHole(center.x(), center.y(), kCircleRadius); |
| 31 actor()->ShowStepPointingTo(name(), center.x(), center.y(), kCircleRadius); | 31 actor()->ShowStepPointingTo(name(), center.x(), center.y(), kCircleRadius); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void HelpStep::OnAfterHide() { | 34 void HelpStep::DoOnAfterHide() { |
| 35 shell_helper()->CloseTrayBubble(); | 35 shell_helper()->CloseTrayBubble(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace first_run | 38 } // namespace first_run |
| 39 } // namespace chromeos | 39 } // namespace chromeos |
| 40 | 40 |
| OLD | NEW |