| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 namespace aura { | 25 namespace aura { |
| 26 class RootWindow; | 26 class RootWindow; |
| 27 class Window; | 27 class Window; |
| 28 } | 28 } |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 namespace ui { | 31 namespace ui { |
| 32 class OSExchangeData; | 32 class OSExchangeData; |
| 33 } | 33 } |
| 34 namespace gfx { |
| 35 class Screen; |
| 36 } |
| 34 namespace views { | 37 namespace views { |
| 35 | 38 |
| 36 class DropTargetEvent; | 39 class DropTargetEvent; |
| 37 class MenuButton; | 40 class MenuButton; |
| 38 class MenuHostRootView; | 41 class MenuHostRootView; |
| 39 class MouseEvent; | 42 class MouseEvent; |
| 40 class SubmenuView; | 43 class SubmenuView; |
| 41 class View; | 44 class View; |
| 42 | 45 |
| 43 namespace internal { | 46 namespace internal { |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 // Handles the mouse location event on the submenu |source|. | 457 // Handles the mouse location event on the submenu |source|. |
| 455 void HandleMouseLocation(SubmenuView* source, | 458 void HandleMouseLocation(SubmenuView* source, |
| 456 const gfx::Point& mouse_location); | 459 const gfx::Point& mouse_location); |
| 457 | 460 |
| 458 #if defined(USE_AURA) | 461 #if defined(USE_AURA) |
| 459 // aura::client::ActivationChangeObserver overrides: | 462 // aura::client::ActivationChangeObserver overrides: |
| 460 virtual void OnWindowActivated(aura::Window* active, | 463 virtual void OnWindowActivated(aura::Window* active, |
| 461 aura::Window* old_active) OVERRIDE; | 464 aura::Window* old_active) OVERRIDE; |
| 462 #endif | 465 #endif |
| 463 | 466 |
| 467 // Retrieve an appropriate Screen. |
| 468 gfx::Screen* GetScreen(); |
| 469 |
| 464 // The active instance. | 470 // The active instance. |
| 465 static MenuController* active_instance_; | 471 static MenuController* active_instance_; |
| 466 | 472 |
| 467 // If true, Run blocks. If false, Run doesn't block and this is used for | 473 // If true, Run blocks. If false, Run doesn't block and this is used for |
| 468 // drag and drop. Note that the semantics for drag and drop are slightly | 474 // drag and drop. Note that the semantics for drag and drop are slightly |
| 469 // different: cancel timer is kicked off any time the drag moves outside the | 475 // different: cancel timer is kicked off any time the drag moves outside the |
| 470 // menu, mouse events do nothing... | 476 // menu, mouse events do nothing... |
| 471 bool blocking_run_; | 477 bool blocking_run_; |
| 472 | 478 |
| 473 // If true, we're showing. | 479 // If true, we're showing. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 // How deep we are in nested message loops. This should be at most 2 (when | 563 // How deep we are in nested message loops. This should be at most 2 (when |
| 558 // showing a context menu from a menu). | 564 // showing a context menu from a menu). |
| 559 int message_loop_depth_; | 565 int message_loop_depth_; |
| 560 | 566 |
| 561 DISALLOW_COPY_AND_ASSIGN(MenuController); | 567 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 562 }; | 568 }; |
| 563 | 569 |
| 564 } // namespace views | 570 } // namespace views |
| 565 | 571 |
| 566 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 572 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |