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

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

Issue 11761027: context menu does not work if one already open (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: crbug.com/151074 Created 7 years, 11 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
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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 // Selects or accepts the appropriate menu item based on |details|. Returns 406 // Selects or accepts the appropriate menu item based on |details|. Returns
407 // true if |Accept| was invoked (which happens if there aren't multiple item 407 // true if |Accept| was invoked (which happens if there aren't multiple item
408 // with the same mnemonic and the item to select does not have a submenu). 408 // with the same mnemonic and the item to select does not have a submenu).
409 bool AcceptOrSelect(MenuItemView* parent, const SelectByCharDetails& details); 409 bool AcceptOrSelect(MenuItemView* parent, const SelectByCharDetails& details);
410 410
411 // Selects by mnemonic, and if that doesn't work tries the first character of 411 // Selects by mnemonic, and if that doesn't work tries the first character of
412 // the title. Returns true if a match was selected and the menu should exit. 412 // the title. Returns true if a match was selected and the menu should exit.
413 bool SelectByChar(char16 key); 413 bool SelectByChar(char16 key);
414 414
415 #if defined(OS_WIN) && !defined(USE_AURA) 415 #if (defined(OS_WIN) && !defined(USE_AURA)) || defined(OS_CHROMEOS)
416 // If there is a window at the location of the event, a new mouse event is 416 // If there is a window at the location of the event, a new mouse event is
417 // generated and posted to it at the given location. 417 // generated and posted to it at the given location.
418 // For Chromeos it applies also to the background window, i.e. always.
418 void RepostEvent(SubmenuView* source, const ui::LocatedEvent& event); 419 void RepostEvent(SubmenuView* source, const ui::LocatedEvent& event);
419 #endif 420 #endif
420 421
421 // Sets the drop target to new_item. 422 // Sets the drop target to new_item.
422 void SetDropMenuItem(MenuItemView* new_item, 423 void SetDropMenuItem(MenuItemView* new_item,
423 MenuDelegate::DropPosition position); 424 MenuDelegate::DropPosition position);
424 425
425 // Starts/stops scrolling as appropriate. part gives the part the mouse is 426 // Starts/stops scrolling as appropriate. part gives the part the mouse is
426 // over. 427 // over.
427 void UpdateScrolling(const MenuPart& part); 428 void UpdateScrolling(const MenuPart& part);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 int message_loop_depth_; 553 int message_loop_depth_;
553 554
554 views::MenuConfig menu_config_; 555 views::MenuConfig menu_config_;
555 556
556 DISALLOW_COPY_AND_ASSIGN(MenuController); 557 DISALLOW_COPY_AND_ASSIGN(MenuController);
557 }; 558 };
558 559
559 } // namespace views 560 } // namespace views
560 561
561 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 562 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698