OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_COMMON_SHELF_OVERFLOW_BUBBLE_H_ | 5 #ifndef ASH_COMMON_SHELF_OVERFLOW_BUBBLE_H_ |
6 #define ASH_COMMON_SHELF_OVERFLOW_BUBBLE_H_ | 6 #define ASH_COMMON_SHELF_OVERFLOW_BUBBLE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/views/pointer_watcher.h" | 9 #include "ui/views/pointer_watcher.h" |
10 #include "ui/views/widget/widget_observer.h" | 10 #include "ui/views/widget/widget_observer.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void HideBubbleAndRefreshButton(); | 42 void HideBubbleAndRefreshButton(); |
43 | 43 |
44 bool IsShowing() const { return !!bubble_; } | 44 bool IsShowing() const { return !!bubble_; } |
45 ShelfView* shelf_view() { return shelf_view_; } | 45 ShelfView* shelf_view() { return shelf_view_; } |
46 OverflowBubbleView* bubble_view() { return bubble_; } | 46 OverflowBubbleView* bubble_view() { return bubble_; } |
47 | 47 |
48 private: | 48 private: |
49 void ProcessPressedEvent(const gfx::Point& event_location_in_screen); | 49 void ProcessPressedEvent(const gfx::Point& event_location_in_screen); |
50 | 50 |
51 // views::PointerWatcher: | 51 // views::PointerWatcher: |
52 void OnMousePressed(const ui::MouseEvent& event, | 52 void OnPointerEventObserved(const ui::LocatedEvent& event, |
53 const gfx::Point& location_in_screen, | 53 const gfx::Point& location_in_screen, |
54 views::Widget* target) override; | 54 views::Widget* target) override; |
55 void OnTouchPressed(const ui::TouchEvent& event, | |
56 const gfx::Point& location_in_screen, | |
57 views::Widget* target) override; | |
58 | 55 |
59 // Overridden from views::WidgetObserver: | 56 // Overridden from views::WidgetObserver: |
60 void OnWidgetDestroying(views::Widget* widget) override; | 57 void OnWidgetDestroying(views::Widget* widget) override; |
61 | 58 |
62 WmShelf* wm_shelf_; | 59 WmShelf* wm_shelf_; |
63 OverflowBubbleView* bubble_; // Owned by views hierarchy. | 60 OverflowBubbleView* bubble_; // Owned by views hierarchy. |
64 views::View* anchor_; // Owned by ShelfView. | 61 views::View* anchor_; // Owned by ShelfView. |
65 ShelfView* shelf_view_; // Owned by |bubble_|. | 62 ShelfView* shelf_view_; // Owned by |bubble_|. |
66 | 63 |
67 DISALLOW_COPY_AND_ASSIGN(OverflowBubble); | 64 DISALLOW_COPY_AND_ASSIGN(OverflowBubble); |
68 }; | 65 }; |
69 | 66 |
70 } // namespace ash | 67 } // namespace ash |
71 | 68 |
72 #endif // ASH_COMMON_SHELF_OVERFLOW_BUBBLE_H_ | 69 #endif // ASH_COMMON_SHELF_OVERFLOW_BUBBLE_H_ |
OLD | NEW |