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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // Internally this updates pending_state_ immediatley. state_ is only updated | 212 // Internally this updates pending_state_ immediatley. state_ is only updated |
213 // immediately if SELECTION_UPDATE_IMMEDIATELY is set. If | 213 // immediately if SELECTION_UPDATE_IMMEDIATELY is set. If |
214 // SELECTION_UPDATE_IMMEDIATELY is not set CommitPendingSelection is invoked | 214 // SELECTION_UPDATE_IMMEDIATELY is not set CommitPendingSelection is invoked |
215 // to show/hide submenus and update state_. | 215 // to show/hide submenus and update state_. |
216 void SetSelection(MenuItemView* menu_item, int types); | 216 void SetSelection(MenuItemView* menu_item, int types); |
217 | 217 |
218 #if defined(OS_WIN) | 218 #if defined(OS_WIN) |
219 // Dispatcher method. This returns true if the menu was canceled, or | 219 // Dispatcher method. This returns true if the menu was canceled, or |
220 // if the message is such that the menu should be closed. | 220 // if the message is such that the menu should be closed. |
221 virtual bool Dispatch(const MSG& msg); | 221 virtual bool Dispatch(const MSG& msg); |
| 222 #elif defined(USE_WAYLAND) |
| 223 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( |
| 224 ui::WaylandEvent* event); |
222 #elif defined(TOUCH_UI) | 225 #elif defined(TOUCH_UI) |
223 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); | 226 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); |
224 #else | 227 #else |
225 virtual bool Dispatch(GdkEvent* event); | 228 virtual bool Dispatch(GdkEvent* event); |
226 #endif | 229 #endif |
227 | 230 |
228 // Key processing. The return value of this is returned from Dispatch. | 231 // Key processing. The return value of this is returned from Dispatch. |
229 // In other words, if this returns false (which happens if escape was | 232 // In other words, if this returns false (which happens if escape was |
230 // pressed, or a matching mnemonic was found) the message loop returns. | 233 // pressed, or a matching mnemonic was found) the message loop returns. |
231 #if defined(OS_WIN) | 234 #if defined(OS_WIN) |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 View* active_mouse_view_; | 502 View* active_mouse_view_; |
500 | 503 |
501 internal::MenuControllerDelegate* delegate_; | 504 internal::MenuControllerDelegate* delegate_; |
502 | 505 |
503 DISALLOW_COPY_AND_ASSIGN(MenuController); | 506 DISALLOW_COPY_AND_ASSIGN(MenuController); |
504 }; | 507 }; |
505 | 508 |
506 } // namespace views | 509 } // namespace views |
507 | 510 |
508 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 511 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |