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 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // Selects by mnemonic, and if that doesn't work tries the first character of | 496 // Selects by mnemonic, and if that doesn't work tries the first character of |
497 // the title. | 497 // the title. |
498 void SelectByChar(base::char16 key); | 498 void SelectByChar(base::char16 key); |
499 | 499 |
500 // For Windows and Aura we repost an event for some events that dismiss | 500 // For Windows and Aura we repost an event for some events that dismiss |
501 // the context menu. The event is then reprocessed to cause its result | 501 // the context menu. The event is then reprocessed to cause its result |
502 // if the context menu had not been present. | 502 // if the context menu had not been present. |
503 // On non-aura Windows, a new mouse event is generated and posted to | 503 // On non-aura Windows, a new mouse event is generated and posted to |
504 // the window (if there is one) at the location of the event. On | 504 // the window (if there is one) at the location of the event. On |
505 // aura, the event is reposted on the RootWindow. | 505 // aura, the event is reposted on the RootWindow. |
506 void RepostEvent(SubmenuView* source, const ui::LocatedEvent* event); | 506 void RepostEvent(SubmenuView* source, |
| 507 const ui::LocatedEvent* event, |
| 508 const gfx::Point& screen_loc, |
| 509 gfx::NativeView native_view, |
| 510 gfx::NativeWindow window); |
| 511 |
| 512 // For Windows and Aura we repost an event which dismisses the |source| menu. |
| 513 // The menu is also canceled dependent on the target of the event. |
| 514 void RepostEventAndCancel(SubmenuView* source, const ui::LocatedEvent* event); |
507 | 515 |
508 // Sets the drop target to new_item. | 516 // Sets the drop target to new_item. |
509 void SetDropMenuItem(MenuItemView* new_item, | 517 void SetDropMenuItem(MenuItemView* new_item, |
510 MenuDelegate::DropPosition position); | 518 MenuDelegate::DropPosition position); |
511 | 519 |
512 // Starts/stops scrolling as appropriate. part gives the part the mouse is | 520 // Starts/stops scrolling as appropriate. part gives the part the mouse is |
513 // over. | 521 // over. |
514 void UpdateScrolling(const MenuPart& part); | 522 void UpdateScrolling(const MenuPart& part); |
515 | 523 |
516 // Stops scrolling. | 524 // Stops scrolling. |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 int current_mouse_pressed_state_; | 703 int current_mouse_pressed_state_; |
696 | 704 |
697 scoped_ptr<MenuMessageLoop> message_loop_; | 705 scoped_ptr<MenuMessageLoop> message_loop_; |
698 | 706 |
699 DISALLOW_COPY_AND_ASSIGN(MenuController); | 707 DISALLOW_COPY_AND_ASSIGN(MenuController); |
700 }; | 708 }; |
701 | 709 |
702 } // namespace views | 710 } // namespace views |
703 | 711 |
704 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 712 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |