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

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

Issue 10546104: Make IsTriggerableEvent take Event objects and use it to verify whether tap events should trigger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass Event to ShouldEnterPushedState. Created 8 years, 6 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/button/custom_button.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // indicate that all menus should be closed. Return false if only the 107 // indicate that all menus should be closed. Return false if only the
108 // context menu should be closed. 108 // context menu should be closed.
109 virtual bool ShouldCloseAllMenusOnExecute(int id); 109 virtual bool ShouldCloseAllMenusOnExecute(int id);
110 110
111 // Executes the specified command. mouse_event_flags give the flags of the 111 // Executes the specified command. mouse_event_flags give the flags of the
112 // mouse event that triggered this to be invoked (views::MouseEvent 112 // mouse event that triggered this to be invoked (views::MouseEvent
113 // flags). mouse_event_flags is 0 if this is triggered by a user gesture 113 // flags). mouse_event_flags is 0 if this is triggered by a user gesture
114 // other than a mouse event. 114 // other than a mouse event.
115 virtual void ExecuteCommand(int id, int mouse_event_flags); 115 virtual void ExecuteCommand(int id, int mouse_event_flags);
116 116
117 // Returns true if the specified mouse event is one the user can use 117 // Returns true if the specified event is one the user can use to trigger, or
118 // to trigger, or accept, the mouse. Defaults to left or right mouse buttons. 118 // accept, the item. Defaults to left or right mouse buttons or tap.
119 virtual bool IsTriggerableEvent(MenuItemView* view, const MouseEvent& e); 119 virtual bool IsTriggerableEvent(MenuItemView* view, const Event& e);
120 120
121 // Invoked to determine if drops can be accepted for a submenu. This is 121 // Invoked to determine if drops can be accepted for a submenu. This is
122 // ONLY invoked for menus that have submenus and indicates whether or not 122 // ONLY invoked for menus that have submenus and indicates whether or not
123 // a drop can occur on any of the child items of the item. For example, 123 // a drop can occur on any of the child items of the item. For example,
124 // consider the following menu structure: 124 // consider the following menu structure:
125 // 125 //
126 // A 126 // A
127 // B 127 // B
128 // C 128 // C
129 // 129 //
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Invoked prior to a menu being shown. 200 // Invoked prior to a menu being shown.
201 virtual void WillShowMenu(MenuItemView* menu); 201 virtual void WillShowMenu(MenuItemView* menu);
202 202
203 // Invoked prior to a menu being hidden. 203 // Invoked prior to a menu being hidden.
204 virtual void WillHideMenu(MenuItemView* menu); 204 virtual void WillHideMenu(MenuItemView* menu);
205 }; 205 };
206 206
207 } // namespace views 207 } // namespace views
208 208
209 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ 209 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/controls/menu/menu_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698