| 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 <list> | 10 #include <list> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 namespace ui { | 30 namespace ui { |
| 31 class NativeTheme; | 31 class NativeTheme; |
| 32 class OSExchangeData; | 32 class OSExchangeData; |
| 33 class ScopedEventDispatcher; | 33 class ScopedEventDispatcher; |
| 34 } | 34 } |
| 35 namespace views { | 35 namespace views { |
| 36 | 36 |
| 37 class MenuButton; | 37 class MenuButton; |
| 38 class MenuHostRootView; | 38 class MenuHostRootView; |
| 39 class MenuItemView; | 39 class MenuItemView; |
| 40 class MenuMessageLoop; |
| 40 class MouseEvent; | 41 class MouseEvent; |
| 41 class SubmenuView; | 42 class SubmenuView; |
| 42 class View; | 43 class View; |
| 43 | 44 |
| 44 namespace internal { | 45 namespace internal { |
| 45 class MenuControllerDelegate; | 46 class MenuControllerDelegate; |
| 46 class MenuEventDispatcher; | 47 class MenuEventDispatcher; |
| 47 class MenuMessagePumpDispatcher; | 48 class MenuMessagePumpDispatcher; |
| 48 class MenuRunnerImpl; | 49 class MenuRunnerImpl; |
| 49 } | 50 } |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 scoped_ptr<MenuScrollTask> scroll_task_; | 565 scoped_ptr<MenuScrollTask> scroll_task_; |
| 565 | 566 |
| 566 MenuButton* menu_button_; | 567 MenuButton* menu_button_; |
| 567 | 568 |
| 568 // ViewStorage id used to store the view mouse drag events are forwarded to. | 569 // ViewStorage id used to store the view mouse drag events are forwarded to. |
| 569 // See UpdateActiveMouseView() for details. | 570 // See UpdateActiveMouseView() for details. |
| 570 const int active_mouse_view_id_; | 571 const int active_mouse_view_id_; |
| 571 | 572 |
| 572 internal::MenuControllerDelegate* delegate_; | 573 internal::MenuControllerDelegate* delegate_; |
| 573 | 574 |
| 574 // How deep we are in nested message loops. This should be at most 2 (when | |
| 575 // showing a context menu from a menu). | |
| 576 int message_loop_depth_; | |
| 577 | |
| 578 views::MenuConfig menu_config_; | 575 views::MenuConfig menu_config_; |
| 579 | 576 |
| 580 // The timestamp of the event which closed the menu - or 0 otherwise. | 577 // The timestamp of the event which closed the menu - or 0 otherwise. |
| 581 base::TimeDelta closing_event_time_; | 578 base::TimeDelta closing_event_time_; |
| 582 | 579 |
| 583 // Time when the menu is first shown. | 580 // Time when the menu is first shown. |
| 584 base::TimeTicks menu_start_time_; | 581 base::TimeTicks menu_start_time_; |
| 585 | 582 |
| 586 // If a mouse press triggered this menu, this will have its location (in | 583 // If a mouse press triggered this menu, this will have its location (in |
| 587 // screen coordinates). Otherwise this will be (0, 0). | 584 // screen coordinates). Otherwise this will be (0, 0). |
| 588 gfx::Point menu_start_mouse_press_loc_; | 585 gfx::Point menu_start_mouse_press_loc_; |
| 589 | 586 |
| 590 // Controls behavior differences between a combobox and other types of menu | 587 // Controls behavior differences between a combobox and other types of menu |
| 591 // (like a context menu). | 588 // (like a context menu). |
| 592 bool is_combobox_; | 589 bool is_combobox_; |
| 593 | 590 |
| 594 // Set to true if the menu item was selected by touch. | 591 // Set to true if the menu item was selected by touch. |
| 595 bool item_selected_by_touch_; | 592 bool item_selected_by_touch_; |
| 596 | 593 |
| 597 scoped_ptr<ui::ScopedEventDispatcher> nested_dispatcher_; | 594 scoped_ptr<MenuMessageLoop> message_loop_; |
| 598 | 595 |
| 599 DISALLOW_COPY_AND_ASSIGN(MenuController); | 596 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 600 }; | 597 }; |
| 601 | 598 |
| 602 } // namespace views | 599 } // namespace views |
| 603 | 600 |
| 604 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 601 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |