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

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

Issue 9466028: aura: Repost click events that cause a menu to hide itself. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 // Selects or accepts the appropriate menu item based on |details|. Returns 395 // Selects or accepts the appropriate menu item based on |details|. Returns
396 // true if |Accept| was invoked (which happens if there aren't multiple item 396 // true if |Accept| was invoked (which happens if there aren't multiple item
397 // with the same mnemonic and the item to select does not have a submenu). 397 // with the same mnemonic and the item to select does not have a submenu).
398 bool AcceptOrSelect(MenuItemView* parent, const SelectByCharDetails& details); 398 bool AcceptOrSelect(MenuItemView* parent, const SelectByCharDetails& details);
399 399
400 // Selects by mnemonic, and if that doesn't work tries the first character of 400 // Selects by mnemonic, and if that doesn't work tries the first character of
401 // the title. Returns true if a match was selected and the menu should exit. 401 // the title. Returns true if a match was selected and the menu should exit.
402 bool SelectByChar(char16 key); 402 bool SelectByChar(char16 key);
403 403
404 #if defined(OS_WIN) && !defined(USE_AURA) 404 #if defined(OS_WIN) || defined(USE_AURA)
405 // If there is a window at the location of the event, a new mouse event is 405 // If there is a window at the location of the event, a new mouse event is
406 // generated and posted to it at the given location. 406 // generated and posted to it at the given location.
407 void RepostEvent(SubmenuView* source, const LocatedEvent& event); 407 void RepostEvent(SubmenuView* source, const LocatedEvent& event);
408 #endif 408 #endif
409 409
410 // Sets the drop target to new_item. 410 // Sets the drop target to new_item.
411 void SetDropMenuItem(MenuItemView* new_item, 411 void SetDropMenuItem(MenuItemView* new_item,
412 MenuDelegate::DropPosition position); 412 MenuDelegate::DropPosition position);
413 413
414 // Starts/stops scrolling as appropriate. part gives the part the mouse is 414 // Starts/stops scrolling as appropriate. part gives the part the mouse is
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 View* active_mouse_view_; 532 View* active_mouse_view_;
533 533
534 internal::MenuControllerDelegate* delegate_; 534 internal::MenuControllerDelegate* delegate_;
535 535
536 DISALLOW_COPY_AND_ASSIGN(MenuController); 536 DISALLOW_COPY_AND_ASSIGN(MenuController);
537 }; 537 };
538 538
539 } // namespace views 539 } // namespace views
540 540
541 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 541 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698