Deleted check for if Aes128Gcm12Encrypter::IsSupported or not beacuse we
[chromium-blink-merge.git] / ash / shelf / overflow_bubble.h
blobaaf71aa1c7b2660f64652edb1a2bae42d6685b3c
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_SHELF_OVERFLOW_BUBBLE_H_
6 #define ASH_SHELF_OVERFLOW_BUBBLE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ui/events/event_handler.h"
11 #include "ui/views/widget/widget_observer.h"
13 namespace ui {
14 class LocatedEvent;
17 namespace views {
18 class View;
21 namespace ash {
23 class LauncherDelegate;
24 class LauncherModel;
26 namespace internal {
28 class LauncherView;
30 // OverflowBubble displays the overflown launcher items in a bubble.
31 class OverflowBubble : public ui::EventHandler,
32 public views::WidgetObserver {
33 public:
34 OverflowBubble();
35 virtual ~OverflowBubble();
37 // Shows an bubble pointing to |anchor| with |launcher_view| as its content.
38 void Show(views::View* anchor, LauncherView* launcher_view);
40 void Hide();
42 // This method as name indicates will hide bubble and schedule paint
43 // for overflow button.
44 void HideBubbleAndRefreshButton();
46 bool IsShowing() const { return !!bubble_; }
47 LauncherView* launcher_view() { return launcher_view_; }
49 private:
50 void ProcessPressedEvent(ui::LocatedEvent* event);
52 // Overridden from ui::EventHandler:
53 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
54 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
56 // Overridden from views::WidgetObserver:
57 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
59 views::View* bubble_; // Owned by views hierarchy.
60 views::View* anchor_; // Owned by LauncherView.
61 LauncherView* launcher_view_; // Owned by |bubble_|.
63 DISALLOW_COPY_AND_ASSIGN(OverflowBubble);
66 } // namespace internal
67 } // namespace ash
69 #endif // ASH_SHELF_OVERFLOW_BUBBLE_H_