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

Side by Side Diff: ui/views/controls/menu/menu_delegate.h

Issue 399143004: Open the WrenchMenu on mouseover when dragging a browser action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 6 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_CONTROLS_MENU_MENU_DELEGATE_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Notification the menu has closed. This is only sent when running the 206 // Notification the menu has closed. This is only sent when running the
207 // menu for a drop. 207 // menu for a drop.
208 virtual void DropMenuClosed(MenuItemView* menu) { 208 virtual void DropMenuClosed(MenuItemView* menu) {
209 } 209 }
210 210
211 // Returns true if the menu should close upon a drag completing. Defaults to 211 // Returns true if the menu should close upon a drag completing. Defaults to
212 // true. This is only invoked for drag and drop operations performed on child 212 // true. This is only invoked for drag and drop operations performed on child
213 // Views that are not MenuItemViews. 213 // Views that are not MenuItemViews.
214 virtual bool ShouldCloseOnDragComplete(); 214 virtual bool ShouldCloseOnDragComplete();
215 215
216 // Returns true if a subview is performing a drag and drop operation, and the
217 // menu shouldn't be closed.
218 virtual bool InNestedDrag();
219
216 // Notification that the user has highlighted the specified item. 220 // Notification that the user has highlighted the specified item.
217 virtual void SelectionChanged(MenuItemView* menu) { 221 virtual void SelectionChanged(MenuItemView* menu) {
218 } 222 }
219 223
220 // If the user drags the mouse outside the bounds of the menu the delegate 224 // If the user drags the mouse outside the bounds of the menu the delegate
221 // is queried for a sibling menu to show. If this returns non-null the 225 // is queried for a sibling menu to show. If this returns non-null the
222 // current menu is hidden, and the menu returned from this method is shown. 226 // current menu is hidden, and the menu returned from this method is shown.
223 // 227 //
224 // The delegate owns the returned menu, not the controller. 228 // The delegate owns the returned menu, not the controller.
225 virtual MenuItemView* GetSiblingMenu(MenuItemView* menu, 229 virtual MenuItemView* GetSiblingMenu(MenuItemView* menu,
(...skipping 20 matching lines...) Expand all
246 int* left_margin, 250 int* left_margin,
247 int* right_margin) const; 251 int* right_margin) const;
248 // Returns true if the labels should reserve additional spacing for e.g. 252 // Returns true if the labels should reserve additional spacing for e.g.
249 // submenu indicators at the end of the line. 253 // submenu indicators at the end of the line.
250 virtual bool ShouldReserveSpaceForSubmenuIndicator() const; 254 virtual bool ShouldReserveSpaceForSubmenuIndicator() const;
251 }; 255 };
252 256
253 } // namespace views 257 } // namespace views
254 258
255 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 259 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698