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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/controls/menu/menu_host_root_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 // If nested menus are showing (nested menus occur when a menu shows a context 103 // If nested menus are showing (nested menus occur when a menu shows a context
104 // menu) this is invoked to determine if all the menus should be closed when 104 // menu) this is invoked to determine if all the menus should be closed when
105 // the user selects the menu with the command |id|. This returns true to 105 // the user selects the menu with the command |id|. This returns true to
106 // indicate that all menus should be closed. Return false if only the 106 // indicate that all menus should be closed. Return false if only the
107 // context menu should be closed. 107 // context menu should be closed.
108 virtual bool ShouldCloseAllMenusOnExecute(int id); 108 virtual bool ShouldCloseAllMenusOnExecute(int id);
109 109
110 // Executes the specified command. mouse_event_flags give the flags of the 110 // Executes the specified command. mouse_event_flags give the flags of the
111 // mouse event that triggered this to be invoked (views::MouseEvent 111 // mouse event that triggered this to be invoked (ui::MouseEvent
112 // flags). mouse_event_flags is 0 if this is triggered by a user gesture 112 // flags). mouse_event_flags is 0 if this is triggered by a user gesture
113 // other than a mouse event. 113 // other than a mouse event.
114 virtual void ExecuteCommand(int id, int mouse_event_flags); 114 virtual void ExecuteCommand(int id, int mouse_event_flags);
115 115
116 // Returns true if the specified event is one the user can use to trigger, or 116 // Returns true if the specified event is one the user can use to trigger, or
117 // accept, the item. Defaults to left or right mouse buttons or tap. 117 // accept, the item. Defaults to left or right mouse buttons or tap.
118 virtual bool IsTriggerableEvent(MenuItemView* view, const ui::Event& e); 118 virtual bool IsTriggerableEvent(MenuItemView* view, const ui::Event& e);
119 119
120 // Invoked to determine if drops can be accepted for a submenu. This is 120 // Invoked to determine if drops can be accepted for a submenu. This is
121 // ONLY invoked for menus that have submenus and indicates whether or not 121 // ONLY invoked for menus that have submenus and indicates whether or not
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 virtual Border* CreateMenuBorder(); 207 virtual Border* CreateMenuBorder();
208 208
209 // Creates and returns a new background for the menu, or NULL if no 209 // Creates and returns a new background for the menu, or NULL if no
210 // background is needed. Caller owns the returned object. 210 // background is needed. Caller owns the returned object.
211 virtual Background* CreateMenuBackground(); 211 virtual Background* CreateMenuBackground();
212 }; 212 };
213 213
214 } // namespace views 214 } // namespace views
215 215
216 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 216 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/controls/menu/menu_host_root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698