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 ASH_FIRST_RUN_FIRST_RUN_HELPER_H_
6 #define ASH_FIRST_RUN_FIRST_RUN_HELPER_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "base/observer_list.h"
22 // Interface used by first-run tutorial to manipulate and retreive information
23 // about shell elements.
24 // All returned coordinates are in screen coordinate system.
25 class ASH_EXPORT FirstRunHelper
{
29 // Called when first-run UI was cancelled.
30 virtual void OnCancelled() = 0;
31 virtual ~Observer() {}
36 virtual ~FirstRunHelper();
38 void AddObserver(Observer
* observer
);
39 void RemoveObserver(Observer
* observer
);
41 // Returns widget to place tutorial UI into it.
42 virtual views::Widget
* GetOverlayWidget() = 0;
44 // Opens and closes app list.
45 virtual void OpenAppList() = 0;
46 virtual void CloseAppList() = 0;
48 // Returns bounding rectangle of launcher elements.
49 virtual gfx::Rect
GetLauncherBounds() = 0;
51 // Returns bounds of application list button.
52 virtual gfx::Rect
GetAppListButtonBounds() = 0;
54 // Returns bounds of application list. You must open application list before
55 // calling this method.
56 virtual gfx::Rect
GetAppListBounds() = 0;
58 // Opens and closes system tray bubble.
59 virtual void OpenTrayBubble() = 0;
60 virtual void CloseTrayBubble() = 0;
62 // Returns |true| iff system tray bubble is opened now.
63 virtual bool IsTrayBubbleOpened() = 0;
65 // Returns bounds of system tray bubble. You must open bubble before calling
67 virtual gfx::Rect
GetTrayBubbleBounds() = 0;
69 // Returns bounds of help app button from system tray buble. You must open
70 // bubble before calling this method.
71 virtual gfx::Rect
GetHelpButtonBounds() = 0;
74 ObserverList
<Observer
>& observers() { return observers_
; }
77 ObserverList
<Observer
> observers_
;
79 DISALLOW_COPY_AND_ASSIGN(FirstRunHelper
);
84 #endif // ASH_FIRST_RUN_FIRST_RUN_HELPER_H_