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