| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 MenuItemView* menu; | 224 MenuItemView* menu; |
| 225 | 225 |
| 226 // If type is MENU_ITEM but the mouse is not over a menu item this is the | 226 // If type is MENU_ITEM but the mouse is not over a menu item this is the |
| 227 // parent of the menu item the user clicked on. Otherwise this is NULL. | 227 // parent of the menu item the user clicked on. Otherwise this is NULL. |
| 228 MenuItemView* parent; | 228 MenuItemView* parent; |
| 229 | 229 |
| 230 // This is the submenu the mouse is over. | 230 // This is the submenu the mouse is over. |
| 231 SubmenuView* submenu; | 231 SubmenuView* submenu; |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 // Sets the selection to menu_item a value of NULL unselects | 234 // Sets the selection to |menu_item|. A value of NULL unselects |
| 235 // everything. |types| is a bitmask of |SetSelectionTypes|. | 235 // everything. |types| is a bitmask of |SetSelectionTypes|. |
| 236 // | 236 // |
| 237 // Internally this updates pending_state_ immediatley. state_ is only updated | 237 // Internally this updates pending_state_ immediatley. state_ is only updated |
| 238 // immediately if SELECTION_UPDATE_IMMEDIATELY is set. If | 238 // immediately if SELECTION_UPDATE_IMMEDIATELY is set. If |
| 239 // SELECTION_UPDATE_IMMEDIATELY is not set CommitPendingSelection is invoked | 239 // SELECTION_UPDATE_IMMEDIATELY is not set CommitPendingSelection is invoked |
| 240 // to show/hide submenus and update state_. | 240 // to show/hide submenus and update state_. |
| 241 void SetSelection(MenuItemView* menu_item, int types); | 241 void SetSelection(MenuItemView* menu_item, int types); |
| 242 | 242 |
| 243 void SetSelectionOnPointerDown(SubmenuView* source, | 243 void SetSelectionOnPointerDown(SubmenuView* source, |
| 244 const ui::LocatedEvent& event); | 244 const ui::LocatedEvent& event); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 int message_loop_depth_; | 552 int message_loop_depth_; |
| 553 | 553 |
| 554 views::MenuConfig menu_config_; | 554 views::MenuConfig menu_config_; |
| 555 | 555 |
| 556 DISALLOW_COPY_AND_ASSIGN(MenuController); | 556 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 557 }; | 557 }; |
| 558 | 558 |
| 559 } // namespace views | 559 } // namespace views |
| 560 | 560 |
| 561 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 561 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |