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

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

Issue 2790773002: Cleanup MenuRunner API (Closed)
Patch Set: Rebase Created 3 years, 8 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // true. This is only invoked for drag and drop operations performed on child 188 // true. This is only invoked for drag and drop operations performed on child
189 // Views that are not MenuItemViews. 189 // Views that are not MenuItemViews.
190 virtual bool ShouldCloseOnDragComplete(); 190 virtual bool ShouldCloseOnDragComplete();
191 191
192 // Notification that the user has highlighted the specified item. 192 // Notification that the user has highlighted the specified item.
193 virtual void SelectionChanged(MenuItemView* menu) { 193 virtual void SelectionChanged(MenuItemView* menu) {
194 } 194 }
195 195
196 // Notification the menu has closed. This will not be called if MenuRunner is 196 // Notification the menu has closed. This will not be called if MenuRunner is
197 // deleted during calls to ExecuteCommand(). 197 // deleted during calls to ExecuteCommand().
198 virtual void OnMenuClosed(MenuItemView* menu, MenuRunner::RunResult result) {} 198 virtual void OnMenuClosed(MenuItemView* menu) {}
199 199
200 // If the user drags the mouse outside the bounds of the menu the delegate 200 // If the user drags the mouse outside the bounds of the menu the delegate
201 // is queried for a sibling menu to show. If this returns non-null the 201 // is queried for a sibling menu to show. If this returns non-null the
202 // current menu is hidden, and the menu returned from this method is shown. 202 // current menu is hidden, and the menu returned from this method is shown.
203 // 203 //
204 // The delegate owns the returned menu, not the controller. 204 // The delegate owns the returned menu, not the controller.
205 virtual MenuItemView* GetSiblingMenu(MenuItemView* menu, 205 virtual MenuItemView* GetSiblingMenu(MenuItemView* menu,
206 const gfx::Point& screen_point, 206 const gfx::Point& screen_point,
207 MenuAnchorPosition* anchor, 207 MenuAnchorPosition* anchor,
208 bool* has_mnemonics, 208 bool* has_mnemonics,
(...skipping 17 matching lines...) Expand all
226 int* left_margin, 226 int* left_margin,
227 int* right_margin) const; 227 int* right_margin) const;
228 // Returns true if the labels should reserve additional spacing for e.g. 228 // Returns true if the labels should reserve additional spacing for e.g.
229 // submenu indicators at the end of the line. 229 // submenu indicators at the end of the line.
230 virtual bool ShouldReserveSpaceForSubmenuIndicator() const; 230 virtual bool ShouldReserveSpaceForSubmenuIndicator() const;
231 }; 231 };
232 232
233 } // namespace views 233 } // namespace views
234 234
235 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 235 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller_unittest.cc ('k') | ui/views/controls/menu/menu_model_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698