| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |