OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 5 #ifndef UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 // Should return true if extra keyboard accessibility is enabled. | 79 // Should return true if extra keyboard accessibility is enabled. |
80 // TrayBubbleView will put focus on the default item if extra keyboard | 80 // TrayBubbleView will put focus on the default item if extra keyboard |
81 // accessibility is enabled. | 81 // accessibility is enabled. |
82 virtual bool ShouldEnableExtraKeyboardAccessibility() = 0; | 82 virtual bool ShouldEnableExtraKeyboardAccessibility() = 0; |
83 | 83 |
84 // Called when a bubble wants to hide/destroy itself (e.g. last visible | 84 // Called when a bubble wants to hide/destroy itself (e.g. last visible |
85 // child view was closed). | 85 // child view was closed). |
86 virtual void HideBubble(const TrayBubbleView* bubble_view) = 0; | 86 virtual void HideBubble(const TrayBubbleView* bubble_view) = 0; |
87 | 87 |
| 88 virtual bool ProcessGestureEventForBubble(ui::GestureEvent* event) = 0; |
| 89 |
88 private: | 90 private: |
89 DISALLOW_COPY_AND_ASSIGN(Delegate); | 91 DISALLOW_COPY_AND_ASSIGN(Delegate); |
90 }; | 92 }; |
91 | 93 |
92 struct VIEWS_EXPORT InitParams { | 94 struct VIEWS_EXPORT InitParams { |
93 InitParams(); | 95 InitParams(); |
94 InitParams(const InitParams& other); | 96 InitParams(const InitParams& other); |
95 Delegate* delegate = nullptr; | 97 Delegate* delegate = nullptr; |
96 gfx::NativeWindow parent_window = nullptr; | 98 gfx::NativeWindow parent_window = nullptr; |
97 View* anchor_view = nullptr; | 99 View* anchor_view = nullptr; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 Widget* bubble_widget) const override; | 153 Widget* bubble_widget) const override; |
152 void OnWidgetClosing(Widget* widget) override; | 154 void OnWidgetClosing(Widget* widget) override; |
153 | 155 |
154 // Overridden from views::View. | 156 // Overridden from views::View. |
155 gfx::Size CalculatePreferredSize() const override; | 157 gfx::Size CalculatePreferredSize() const override; |
156 gfx::Size GetMaximumSize() const override; | 158 gfx::Size GetMaximumSize() const override; |
157 int GetHeightForWidth(int width) const override; | 159 int GetHeightForWidth(int width) const override; |
158 void OnMouseEntered(const ui::MouseEvent& event) override; | 160 void OnMouseEntered(const ui::MouseEvent& event) override; |
159 void OnMouseExited(const ui::MouseEvent& event) override; | 161 void OnMouseExited(const ui::MouseEvent& event) override; |
160 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; | 162 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 163 void OnGestureEvent(ui::GestureEvent* event) override; |
161 | 164 |
162 // Overridden from MouseWatcherListener | 165 // Overridden from MouseWatcherListener |
163 void MouseMovedOutOfHost() override; | 166 void MouseMovedOutOfHost() override; |
164 | 167 |
165 // Overridden from ui::AcceleratorTarget | 168 // Overridden from ui::AcceleratorTarget |
166 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 169 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
167 | 170 |
168 protected: | 171 protected: |
169 // Overridden from views::BubbleDialogDelegateView. | 172 // Overridden from views::BubbleDialogDelegateView. |
170 int GetDialogButtons() const override; | 173 int GetDialogButtons() const override; |
(...skipping 28 matching lines...) Expand all Loading... |
199 | 202 |
200 // Used to find any mouse movements. | 203 // Used to find any mouse movements. |
201 std::unique_ptr<MouseWatcher> mouse_watcher_; | 204 std::unique_ptr<MouseWatcher> mouse_watcher_; |
202 | 205 |
203 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); | 206 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); |
204 }; | 207 }; |
205 | 208 |
206 } // namespace views | 209 } // namespace views |
207 | 210 |
208 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 211 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
OLD | NEW |