OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "views/controls/menu/menu_controller.h" | 5 #include "views/controls/menu/menu_controller.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "ui/base/dragdrop/os_exchange_data.h" | 10 #include "ui/base/dragdrop/os_exchange_data.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 // Index of the selected item; may remain -1. | 237 // Index of the selected item; may remain -1. |
238 int index_of_item; | 238 int index_of_item; |
239 | 239 |
240 // If there are multiple matches this is the index of the item after the | 240 // If there are multiple matches this is the index of the item after the |
241 // currently selected item whose mnemonic matches. This may remain -1 even | 241 // currently selected item whose mnemonic matches. This may remain -1 even |
242 // though there are matches. | 242 // though there are matches. |
243 int next_match; | 243 int next_match; |
244 }; | 244 }; |
245 | 245 |
| 246 // MenuController:State ------------------------------------------------------ |
| 247 |
| 248 MenuController::State::State() : item(NULL), submenu_open(false) {} |
| 249 |
| 250 MenuController::State::~State() {} |
| 251 |
246 // MenuController ------------------------------------------------------------ | 252 // MenuController ------------------------------------------------------------ |
247 | 253 |
248 // static | 254 // static |
249 MenuController* MenuController::active_instance_ = NULL; | 255 MenuController* MenuController::active_instance_ = NULL; |
250 | 256 |
251 // static | 257 // static |
252 MenuController* MenuController::GetActiveInstance() { | 258 MenuController* MenuController::GetActiveInstance() { |
253 return active_instance_; | 259 return active_instance_; |
254 } | 260 } |
255 | 261 |
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 | 1841 |
1836 MouseEvent release_event(ui::ET_MOUSE_RELEASED, -1, -1, 0); | 1842 MouseEvent release_event(ui::ET_MOUSE_RELEASED, -1, -1, 0); |
1837 // Reset the active_mouse_view_ before sending mouse released. That way if if | 1843 // Reset the active_mouse_view_ before sending mouse released. That way if if |
1838 // calls back to use we aren't in a weird state. | 1844 // calls back to use we aren't in a weird state. |
1839 View* active_view = active_mouse_view_; | 1845 View* active_view = active_mouse_view_; |
1840 active_mouse_view_ = NULL; | 1846 active_mouse_view_ = NULL; |
1841 active_view->OnMouseReleased(release_event, true); | 1847 active_view->OnMouseReleased(release_event, true); |
1842 } | 1848 } |
1843 | 1849 |
1844 } // namespace views | 1850 } // namespace views |
OLD | NEW |