OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
6 #define VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 6 #define 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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // MenuController ------------------------------------------------------------- | 35 // MenuController ------------------------------------------------------------- |
36 | 36 |
37 // MenuController is used internally by the various menu classes to manage | 37 // MenuController is used internally by the various menu classes to manage |
38 // showing, selecting and drag/drop for menus. All relevant events are | 38 // showing, selecting and drag/drop for menus. All relevant events are |
39 // forwarded to the MenuController from SubmenuView and MenuHost. | 39 // forwarded to the MenuController from SubmenuView and MenuHost. |
40 class VIEWS_EXPORT MenuController : public MessageLoop::Dispatcher { | 40 class VIEWS_EXPORT MenuController : public MessageLoop::Dispatcher { |
41 public: | 41 public: |
42 friend class MenuHostRootView; | 42 friend class MenuHostRootView; |
43 friend class MenuItemView; | 43 friend class MenuItemView; |
| 44 friend class SubmenuView; |
44 | 45 |
45 // Enumeration of how the menu should exit. | 46 // Enumeration of how the menu should exit. |
46 enum ExitType { | 47 enum ExitType { |
47 // Don't exit. | 48 // Don't exit. |
48 EXIT_NONE, | 49 EXIT_NONE, |
49 | 50 |
50 // All menus, including nested, should be exited. | 51 // All menus, including nested, should be exited. |
51 EXIT_ALL, | 52 EXIT_ALL, |
52 | 53 |
53 // Only the outermost menu should be exited. | 54 // Only the outermost menu should be exited. |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 // If non-null mouse drag events are forwarded to this view. See | 493 // If non-null mouse drag events are forwarded to this view. See |
493 // UpdateActiveMouseView for details. | 494 // UpdateActiveMouseView for details. |
494 View* active_mouse_view_; | 495 View* active_mouse_view_; |
495 | 496 |
496 DISALLOW_COPY_AND_ASSIGN(MenuController); | 497 DISALLOW_COPY_AND_ASSIGN(MenuController); |
497 }; | 498 }; |
498 | 499 |
499 } // namespace views | 500 } // namespace views |
500 | 501 |
501 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 502 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |