OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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. | |
4 | |
5 #ifndef ASH_LAUNCHER_OVERFLOW_BUBBLE_H_ | |
6 #define ASH_LAUNCHER_OVERFLOW_BUBBLE_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "ui/views/widget/widget_observer.h" | |
11 | |
12 namespace views { | |
13 class View; | |
14 } | |
15 | |
16 namespace ash { | |
17 | |
18 class LauncherDelegate; | |
19 class LauncherModel; | |
20 | |
21 namespace internal { | |
22 | |
23 class LauncherView; | |
24 | |
25 // OverflowBubble displays the overflown launcher items in a bubble. | |
26 class OverflowBubble : public views::WidgetObserver { | |
27 public: | |
28 OverflowBubble(); | |
29 virtual ~OverflowBubble(); | |
30 | |
31 // Shows an bubble pointing to |anchor| with |launcher_view| as its content. | |
32 void Show(views::View* anchor, LauncherView* launcher_view); | |
33 | |
34 void Hide(); | |
35 | |
36 bool IsShowing() const { return !!bubble_; } | |
37 LauncherView* launcher_view() { return launcher_view_; } | |
38 | |
39 private: | |
40 // Overridden from views::WidgetObserver: | |
41 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | |
42 | |
43 views::View* bubble_; // Owned by views hierarchy. | |
44 LauncherView* launcher_view_; // Owned by |bubble_|. | |
45 | |
46 DISALLOW_COPY_AND_ASSIGN(OverflowBubble); | |
47 }; | |
48 | |
49 } // namespace internal | |
50 } // namespace ash | |
51 | |
52 #endif // ASH_LAUNCHER_OVERFLOW_BUBBLE_H_ | |
OLD | NEW |