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_FIRST_RUN_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_FIRST_RUN_FIRST_RUN_CONTROLLER_H_
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "base/memory/linked_ptr.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h"
27 // FirstRunController creates and manages first-run tutorial.
28 // Object manages its lifetime and deletes itself after completion of the
30 class FirstRunController
: public FirstRunActor::Delegate
{
31 typedef std::vector
<linked_ptr
<first_run::Step
> > Steps
;
35 virtual ~FirstRunController();
37 // Creates first-run UI and starts tutorial.
40 // Finalizes first-run tutorial and destroys UI.
44 // Overriden from FirstRunActor::Delegate.
45 virtual void OnActorInitialized() OVERRIDE
;
46 virtual void OnNextButtonClicked(const std::string
& step_name
) OVERRIDE
;
47 virtual void OnActorDestroyed() OVERRIDE
;
52 first_run::Step
* GetCurrentStep() const;
54 // The object providing interface to UI layer. It's not directly owned by
55 // FirstRunController.
56 FirstRunActor
* actor_
;
58 // Helper for manipulating and retreiving information from Shell.
59 scoped_ptr
<ash::FirstRunHelper
> shell_helper_
;
61 // List of all tutorial steps.
64 // Index of step that is currently shown.
65 size_t current_step_index_
;
67 DISALLOW_COPY_AND_ASSIGN(FirstRunController
);
70 } // namespace chromeos
72 #endif // CHROME_BROWSER_CHROMEOS_FIRST_RUN_FIRST_RUN_CONTROLLER_H_