| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 void SetActiveMouseView(View* view); | 536 void SetActiveMouseView(View* view); |
| 537 View* GetActiveMouseView(); | 537 View* GetActiveMouseView(); |
| 538 | 538 |
| 539 // Sets exit type. Calling this can terminate the active nested message-loop. | 539 // Sets exit type. Calling this can terminate the active nested message-loop. |
| 540 void SetExitType(ExitType type); | 540 void SetExitType(ExitType type); |
| 541 | 541 |
| 542 // Terminates the current nested message-loop, if there is any. Returns |true| | 542 // Terminates the current nested message-loop, if there is any. Returns |true| |
| 543 // if any message loop is terminated. | 543 // if any message loop is terminated. |
| 544 bool TerminateNestedMessageLoopIfNecessary(); | 544 bool TerminateNestedMessageLoopIfNecessary(); |
| 545 | 545 |
| 546 // Performs the teardown of menus launched with |async_run_|. This will |
| 547 // notifiy the |delegate_|. If |exit_type_| is EXIT_ALL all nested |
| 548 // asynchronous runs will be exited. |
| 549 void ExitAsyncRun(); |
| 550 |
| 546 // Performs the teardown of the menu launched by Run(). The selected item is | 551 // Performs the teardown of the menu launched by Run(). The selected item is |
| 547 // returned. | 552 // returned. |
| 548 MenuItemView* ExitMenuRun(); | 553 MenuItemView* ExitMenuRun(); |
| 549 | 554 |
| 550 // Handles the mouse location event on the submenu |source|. | 555 // Handles the mouse location event on the submenu |source|. |
| 551 void HandleMouseLocation(SubmenuView* source, | 556 void HandleMouseLocation(SubmenuView* source, |
| 552 const gfx::Point& mouse_location); | 557 const gfx::Point& mouse_location); |
| 553 | 558 |
| 554 // Retrieve an appropriate Screen. | 559 // Retrieve an appropriate Screen. |
| 555 gfx::Screen* GetScreen(); | 560 gfx::Screen* GetScreen(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 int current_mouse_pressed_state_; | 694 int current_mouse_pressed_state_; |
| 690 | 695 |
| 691 scoped_ptr<MenuMessageLoop> message_loop_; | 696 scoped_ptr<MenuMessageLoop> message_loop_; |
| 692 | 697 |
| 693 DISALLOW_COPY_AND_ASSIGN(MenuController); | 698 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 694 }; | 699 }; |
| 695 | 700 |
| 696 } // namespace views | 701 } // namespace views |
| 697 | 702 |
| 698 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 703 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |