| 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_NATIVE_MENU_WIN_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // system menu. | 130 // system menu. |
| 131 HWND system_menu_for_; | 131 HWND system_menu_for_; |
| 132 | 132 |
| 133 // The index of the first item in the model in the menu. | 133 // The index of the first item in the model in the menu. |
| 134 int first_item_index_; | 134 int first_item_index_; |
| 135 | 135 |
| 136 // The action that took place during the call to RunMenuAt. | 136 // The action that took place during the call to RunMenuAt. |
| 137 MenuAction menu_action_; | 137 MenuAction menu_action_; |
| 138 | 138 |
| 139 // A list of listeners to call when the menu opens. | 139 // A list of listeners to call when the menu opens. |
| 140 ObserverList<MenuListener> listeners_; | 140 base::ObserverList<MenuListener> listeners_; |
| 141 | 141 |
| 142 // Keep track of whether the listeners have already been called at least | 142 // Keep track of whether the listeners have already been called at least |
| 143 // once. | 143 // once. |
| 144 bool listeners_called_; | 144 bool listeners_called_; |
| 145 | 145 |
| 146 // See comment in MenuMessageHook for details on these. | 146 // See comment in MenuMessageHook for details on these. |
| 147 NativeMenuWin* menu_to_select_; | 147 NativeMenuWin* menu_to_select_; |
| 148 int position_to_select_; | 148 int position_to_select_; |
| 149 | 149 |
| 150 // If we're a submenu, this is our parent. | 150 // If we're a submenu, this is our parent. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 161 // has a menu open, because our hook function that receives keyboard | 161 // has a menu open, because our hook function that receives keyboard |
| 162 // events doesn't have a mechanism to get a user data pointer. | 162 // events doesn't have a mechanism to get a user data pointer. |
| 163 static NativeMenuWin* open_native_menu_win_; | 163 static NativeMenuWin* open_native_menu_win_; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(NativeMenuWin); | 165 DISALLOW_COPY_AND_ASSIGN(NativeMenuWin); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace views | 168 } // namespace views |
| 169 | 169 |
| 170 #endif // UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ | 170 #endif // UI_VIEWS_CONTROLS_MENU_NATIVE_MENU_WIN_H_ |
| OLD | NEW |