OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SHELF_OVERFLOW_BUBBLE_H_ | 5 #ifndef ASH_SHELF_OVERFLOW_BUBBLE_H_ |
6 #define ASH_SHELF_OVERFLOW_BUBBLE_H_ | 6 #define ASH_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" |
11 | 11 |
(...skipping 27 matching lines...) Expand all Loading... |
39 void HideBubbleAndRefreshButton(); | 39 void HideBubbleAndRefreshButton(); |
40 | 40 |
41 bool IsShowing() const { return !!bubble_; } | 41 bool IsShowing() const { return !!bubble_; } |
42 ShelfView* shelf_view() { return shelf_view_; } | 42 ShelfView* shelf_view() { return shelf_view_; } |
43 OverflowBubbleView* bubble_view() { return bubble_; } | 43 OverflowBubbleView* bubble_view() { return bubble_; } |
44 | 44 |
45 private: | 45 private: |
46 void ProcessPressedEvent(const gfx::Point& event_location_in_screen); | 46 void ProcessPressedEvent(const gfx::Point& event_location_in_screen); |
47 | 47 |
48 // views::PointerWatcher: | 48 // views::PointerWatcher: |
49 void OnMousePressed(const ui::MouseEvent& event, | 49 void OnMousePressObserved(const ui::MouseEvent& event, |
50 const gfx::Point& location_in_screen, | 50 const gfx::Point& location_in_screen, |
51 views::Widget* target) override; | 51 views::Widget* target) override; |
52 void OnTouchPressed(const ui::TouchEvent& event, | 52 void OnTouchPressObserved(const ui::TouchEvent& 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 OnTouchReleaseObserved(const ui::TouchEvent& event, |
| 56 const gfx::Point& location_in_screen, |
| 57 views::Widget* target) override; |
| 58 void OnTouchMoveObserved(const ui::TouchEvent& event, |
| 59 const gfx::Point& location_in_screen, |
| 60 views::Widget* target) override; |
| 61 void OnTouchCancellObserved(const ui::TouchEvent& event, |
| 62 const gfx::Point& location_in_screen, |
| 63 views::Widget* target) override; |
55 | 64 |
56 // Overridden from views::WidgetObserver: | 65 // Overridden from views::WidgetObserver: |
57 void OnWidgetDestroying(views::Widget* widget) override; | 66 void OnWidgetDestroying(views::Widget* widget) override; |
58 | 67 |
59 OverflowBubbleView* bubble_; // Owned by views hierarchy. | 68 OverflowBubbleView* bubble_; // Owned by views hierarchy. |
60 views::View* anchor_; // Owned by ShelfView. | 69 views::View* anchor_; // Owned by ShelfView. |
61 ShelfView* shelf_view_; // Owned by |bubble_|. | 70 ShelfView* shelf_view_; // Owned by |bubble_|. |
62 | 71 |
63 DISALLOW_COPY_AND_ASSIGN(OverflowBubble); | 72 DISALLOW_COPY_AND_ASSIGN(OverflowBubble); |
64 }; | 73 }; |
65 | 74 |
66 } // namespace ash | 75 } // namespace ash |
67 | 76 |
68 #endif // ASH_SHELF_OVERFLOW_BUBBLE_H_ | 77 #endif // ASH_SHELF_OVERFLOW_BUBBLE_H_ |
OLD | NEW |