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

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

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 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
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_CONTROLLER_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <list> 10 #include <list>
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // when blocking. This schedules the loop to quit. 284 // when blocking. This schedules the loop to quit.
285 void Accept(MenuItemView* item, int event_flags); 285 void Accept(MenuItemView* item, int event_flags);
286 286
287 bool ShowSiblingMenu(SubmenuView* source, const gfx::Point& mouse_location); 287 bool ShowSiblingMenu(SubmenuView* source, const gfx::Point& mouse_location);
288 288
289 // Shows a context menu for |menu_item| as a result of a located event if 289 // Shows a context menu for |menu_item| as a result of a located event if
290 // appropriate. This is invoked on long press and releasing the right mouse 290 // appropriate. This is invoked on long press and releasing the right mouse
291 // button. Returns whether a context menu was shown. 291 // button. Returns whether a context menu was shown.
292 bool ShowContextMenu(MenuItemView* menu_item, 292 bool ShowContextMenu(MenuItemView* menu_item,
293 SubmenuView* source, 293 SubmenuView* source,
294 const ui::LocatedEvent& event); 294 const ui::LocatedEvent& event,
295 ui::MenuSourceType source_type);
295 296
296 // Closes all menus, including any menus of nested invocations of Run. 297 // Closes all menus, including any menus of nested invocations of Run.
297 void CloseAllNestedMenus(); 298 void CloseAllNestedMenus();
298 299
299 // Gets the enabled menu item at the specified location. 300 // Gets the enabled menu item at the specified location.
300 // If over_any_menu is non-null it is set to indicate whether the location 301 // If over_any_menu is non-null it is set to indicate whether the location
301 // is over any menu. It is possible for this to return NULL, but 302 // is over any menu. It is possible for this to return NULL, but
302 // over_any_menu to be true. For example, the user clicked on a separator. 303 // over_any_menu to be true. For example, the user clicked on a separator.
303 MenuItemView* GetMenuItemAt(View* menu, int x, int y); 304 MenuItemView* GetMenuItemAt(View* menu, int x, int y);
304 305
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 573
573 // Time when the menu is first shown. 574 // Time when the menu is first shown.
574 base::TimeTicks menu_start_time_; 575 base::TimeTicks menu_start_time_;
575 576
576 DISALLOW_COPY_AND_ASSIGN(MenuController); 577 DISALLOW_COPY_AND_ASSIGN(MenuController);
577 }; 578 };
578 579
579 } // namespace views 580 } // namespace views
580 581
581 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 582 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/native_combobox_views.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698