| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 void SetSelection(MenuItemView* menu_item, int types); | 235 void SetSelection(MenuItemView* menu_item, int types); |
| 236 | 236 |
| 237 void SetSelectionOnPointerDown(SubmenuView* source, | 237 void SetSelectionOnPointerDown(SubmenuView* source, |
| 238 const LocatedEvent& event); | 238 const LocatedEvent& event); |
| 239 void StartDrag(SubmenuView* source, const gfx::Point& location); | 239 void StartDrag(SubmenuView* source, const gfx::Point& location); |
| 240 | 240 |
| 241 #if defined(OS_WIN) | 241 #if defined(OS_WIN) |
| 242 // Dispatcher method. This returns true if the menu was canceled, or | 242 // Dispatcher method. This returns true if the menu was canceled, or |
| 243 // if the message is such that the menu should be closed. | 243 // if the message is such that the menu should be closed. |
| 244 virtual bool Dispatch(const MSG& msg) OVERRIDE; | 244 virtual bool Dispatch(const MSG& msg) OVERRIDE; |
| 245 #elif defined(USE_WAYLAND) | |
| 246 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( | |
| 247 base::wayland::WaylandEvent* event) OVERRIDE; | |
| 248 #elif defined(USE_AURA) | 245 #elif defined(USE_AURA) |
| 249 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( | 246 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( |
| 250 XEvent* xevent) OVERRIDE; | 247 XEvent* xevent) OVERRIDE; |
| 251 #endif | 248 #endif |
| 252 | 249 |
| 253 // Key processing. The return value of this is returned from Dispatch. | 250 // Key processing. The return value of this is returned from Dispatch. |
| 254 // In other words, if this returns false (which happens if escape was | 251 // In other words, if this returns false (which happens if escape was |
| 255 // pressed, or a matching mnemonic was found) the message loop returns. | 252 // pressed, or a matching mnemonic was found) the message loop returns. |
| 256 bool OnKeyDown(ui::KeyboardCode key_code); | 253 bool OnKeyDown(ui::KeyboardCode key_code); |
| 257 | 254 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 View* active_mouse_view_; | 527 View* active_mouse_view_; |
| 531 | 528 |
| 532 internal::MenuControllerDelegate* delegate_; | 529 internal::MenuControllerDelegate* delegate_; |
| 533 | 530 |
| 534 DISALLOW_COPY_AND_ASSIGN(MenuController); | 531 DISALLOW_COPY_AND_ASSIGN(MenuController); |
| 535 }; | 532 }; |
| 536 | 533 |
| 537 } // namespace views | 534 } // namespace views |
| 538 | 535 |
| 539 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 536 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
| OLD | NEW |