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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_FIRST_RUN_STEP_H_
6 #define CHROME_BROWSER_CHROMEOS_FIRST_RUN_STEP_H_
10 #include "base/basictypes.h"
11 #include "base/time/time.h"
29 Step(const std::string
& name
,
30 ash::FirstRunHelper
* shell_helper
,
31 FirstRunActor
* actor
);
34 // Step shows its content.
37 // Called before hiding step.
40 // Called after step has been hidden.
43 const std::string
& name() const { return name_
; }
46 ash::FirstRunHelper
* shell_helper() const { return shell_helper_
; }
47 FirstRunActor
* actor() const { return actor_
; }
48 gfx::Size
GetOverlaySize() const;
50 // Called from Show method.
51 virtual void DoShow() = 0;
53 // Called from OnBeforeHide. Step implementation could override this method to
54 // react on corresponding event.
55 virtual void DoOnBeforeHide() {}
57 // Called from OnAfterHide. Step implementation could override this method to
59 virtual void DoOnAfterHide() {}
62 // Records time spent on step to UMA.
63 void RecordCompletion();
66 ash::FirstRunHelper
* shell_helper_
;
67 FirstRunActor
* actor_
;
68 base::Time show_time_
;
70 DISALLOW_COPY_AND_ASSIGN(Step
);
73 } // namespace first_run
74 } // namespace chromeos
76 #endif // CHROME_BROWSER_CHROMEOS_FIRST_RUN_STEP_H_