Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: ui/views/bubble/tray_bubble_view.h

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Called when a bubble wants to be dragged (e.g. opened system tray bubble
89 // can be dragged downward to close).
90 virtual bool ProcessGestureEventOnBubbleView(ui::GestureEvent* event,
91 View* target);
92
88 private: 93 private:
89 DISALLOW_COPY_AND_ASSIGN(Delegate); 94 DISALLOW_COPY_AND_ASSIGN(Delegate);
90 }; 95 };
91 96
92 struct VIEWS_EXPORT InitParams { 97 struct VIEWS_EXPORT InitParams {
93 InitParams(); 98 InitParams();
94 InitParams(const InitParams& other); 99 InitParams(const InitParams& other);
95 Delegate* delegate = nullptr; 100 Delegate* delegate = nullptr;
96 gfx::NativeWindow parent_window = nullptr; 101 gfx::NativeWindow parent_window = nullptr;
97 View* anchor_view = nullptr; 102 View* anchor_view = nullptr;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 Widget* bubble_widget) const override; 156 Widget* bubble_widget) const override;
152 void OnWidgetClosing(Widget* widget) override; 157 void OnWidgetClosing(Widget* widget) override;
153 158
154 // Overridden from views::View. 159 // Overridden from views::View.
155 gfx::Size CalculatePreferredSize() const override; 160 gfx::Size CalculatePreferredSize() const override;
156 gfx::Size GetMaximumSize() const override; 161 gfx::Size GetMaximumSize() const override;
157 int GetHeightForWidth(int width) const override; 162 int GetHeightForWidth(int width) const override;
158 void OnMouseEntered(const ui::MouseEvent& event) override; 163 void OnMouseEntered(const ui::MouseEvent& event) override;
159 void OnMouseExited(const ui::MouseEvent& event) override; 164 void OnMouseExited(const ui::MouseEvent& event) override;
160 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; 165 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
166 void OnGestureEvent(ui::GestureEvent* event) override;
161 167
162 // Overridden from MouseWatcherListener 168 // Overridden from MouseWatcherListener
163 void MouseMovedOutOfHost() override; 169 void MouseMovedOutOfHost() override;
164 170
165 // Overridden from ui::AcceleratorTarget 171 // Overridden from ui::AcceleratorTarget
166 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 172 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
167 173
168 protected: 174 protected:
169 // Overridden from views::BubbleDialogDelegateView. 175 // Overridden from views::BubbleDialogDelegateView.
170 int GetDialogButtons() const override; 176 int GetDialogButtons() const override;
(...skipping 28 matching lines...) Expand all
199 205
200 // Used to find any mouse movements. 206 // Used to find any mouse movements.
201 std::unique_ptr<MouseWatcher> mouse_watcher_; 207 std::unique_ptr<MouseWatcher> mouse_watcher_;
202 208
203 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); 209 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView);
204 }; 210 };
205 211
206 } // namespace views 212 } // namespace views
207 213
208 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 214 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698