| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) | 222 #elif defined(USE_WAYLAND) |
| 223 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( | 223 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( |
| 224 ui::WaylandEvent* event); | 224 ui::WaylandEvent* event); |
| 225 #elif defined(TOUCH_UI) | 225 #elif defined(TOUCH_UI) || defined(USE_AURA) |
| 226 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); | 226 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); |
| 227 #else | 227 #else |
| 228 virtual bool Dispatch(GdkEvent* event); | 228 virtual bool Dispatch(GdkEvent* event); |
| 229 #endif | 229 #endif |
| 230 | 230 |
| 231 // Key processing. The return value of this is returned from Dispatch. | 231 // Key processing. The return value of this is returned from Dispatch. |
| 232 // 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 |
| 233 // pressed, or a matching mnemonic was found) the message loop returns. | 233 // pressed, or a matching mnemonic was found) the message loop returns. |
| 234 #if defined(OS_WIN) | 234 #if defined(OS_WIN) |
| 235 bool OnKeyDown(int key_code, const MSG& msg); | 235 bool OnKeyDown(int key_code, const MSG& msg); |
| (...skipping 266 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 |