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

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

Issue 11485022: Open bookmark in new background tab at Ctrl+Click but not closing menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2012-12-12T10:27 Changes for review comments Created 8 years 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_delegate.cc » ('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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // indicate that all menus should be closed. Return false if only the 105 // indicate that all menus should be closed. Return false if only the
106 // context menu should be closed. 106 // context menu should be closed.
107 virtual bool ShouldCloseAllMenusOnExecute(int id); 107 virtual bool ShouldCloseAllMenusOnExecute(int id);
108 108
109 // Executes the specified command. mouse_event_flags give the flags of the 109 // Executes the specified command. mouse_event_flags give the flags of the
110 // mouse event that triggered this to be invoked (ui::MouseEvent 110 // mouse event that triggered this to be invoked (ui::MouseEvent
111 // flags). mouse_event_flags is 0 if this is triggered by a user gesture 111 // flags). mouse_event_flags is 0 if this is triggered by a user gesture
112 // other than a mouse event. 112 // other than a mouse event.
113 virtual void ExecuteCommand(int id, int mouse_event_flags); 113 virtual void ExecuteCommand(int id, int mouse_event_flags);
114 114
115 // Returns true if ExecuteCommand() should be invoked while leaving the
116 // menu open. Default implementation returns true.
117 virtual bool ShouldExecuteCommandWithoutClosingMenu(int id,
118 const ui::Event& e);
119
115 // Returns true if the specified event is one the user can use to trigger, or 120 // Returns true if the specified event is one the user can use to trigger, or
116 // accept, the item. Defaults to left or right mouse buttons or tap. 121 // accept, the item. Defaults to left or right mouse buttons or tap.
117 virtual bool IsTriggerableEvent(MenuItemView* view, const ui::Event& e); 122 virtual bool IsTriggerableEvent(MenuItemView* view, const ui::Event& e);
118 123
119 // Invoked to determine if drops can be accepted for a submenu. This is 124 // Invoked to determine if drops can be accepted for a submenu. This is
120 // ONLY invoked for menus that have submenus and indicates whether or not 125 // ONLY invoked for menus that have submenus and indicates whether or not
121 // a drop can occur on any of the child items of the item. For example, 126 // a drop can occur on any of the child items of the item. For example,
122 // consider the following menu structure: 127 // consider the following menu structure:
123 // 128 //
124 // A 129 // A
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // Invoked prior to a menu being shown. 203 // Invoked prior to a menu being shown.
199 virtual void WillShowMenu(MenuItemView* menu); 204 virtual void WillShowMenu(MenuItemView* menu);
200 205
201 // Invoked prior to a menu being hidden. 206 // Invoked prior to a menu being hidden.
202 virtual void WillHideMenu(MenuItemView* menu); 207 virtual void WillHideMenu(MenuItemView* menu);
203 }; 208 };
204 209
205 } // namespace views 210 } // namespace views
206 211
207 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 212 #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_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698