Roll ffmpeg 2fa2c9a:202208
[chromium-blink-merge.git] / ash / first_run / first_run_helper.h
blob42bc6979cd00439134be8482bd2ea18efb65f9b2
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"
12 namespace gfx {
13 class Rect;
16 namespace views {
17 class Widget;
20 namespace ash {
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 {
26 public:
27 class Observer {
28 public:
29 // Called when first-run UI was cancelled.
30 virtual void OnCancelled() = 0;
31 virtual ~Observer() {}
34 public:
35 FirstRunHelper();
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
66 // this method.
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;
73 protected:
74 ObserverList<Observer>& observers() { return observers_; }
76 private:
77 ObserverList<Observer> observers_;
79 DISALLOW_COPY_AND_ASSIGN(FirstRunHelper);
82 } // namespace ash
84 #endif // ASH_FIRST_RUN_FIRST_RUN_HELPER_H_