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 #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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 #if defined(OS_WIN) | 186 #if defined(OS_WIN) |
187 // Dispatcher method. This returns true if the menu was canceled, or | 187 // Dispatcher method. This returns true if the menu was canceled, or |
188 // if the message is such that the menu should be closed. | 188 // if the message is such that the menu should be closed. |
189 virtual bool Dispatch(const MSG& msg); | 189 virtual bool Dispatch(const MSG& msg); |
190 | 190 |
191 #else | 191 #else |
192 virtual bool Dispatch(GdkEvent* event); | 192 virtual bool Dispatch(GdkEvent* event); |
193 #endif | 193 #endif |
194 | 194 |
| 195 #if defined(TOUCH_UI) |
| 196 virtual bool Dispatch(XEvent* xevent); |
| 197 #endif |
| 198 |
195 // Key processing. The return value of this is returned from Dispatch. | 199 // Key processing. The return value of this is returned from Dispatch. |
196 // In other words, if this returns false (which happens if escape was | 200 // In other words, if this returns false (which happens if escape was |
197 // pressed, or a matching mnemonic was found) the message loop returns. | 201 // pressed, or a matching mnemonic was found) the message loop returns. |
198 #if defined(OS_WIN) | 202 #if defined(OS_WIN) |
199 bool OnKeyDown(int key_code, const MSG& msg); | 203 bool OnKeyDown(int key_code, const MSG& msg); |
200 #else | 204 #else |
201 bool OnKeyDown(int key_code); | 205 bool OnKeyDown(int key_code); |
202 #endif | 206 #endif |
203 | 207 |
204 // Creates a MenuController. If blocking is true, Run blocks the caller | 208 // Creates a MenuController. If blocking is true, Run blocks the caller |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 // If non-null mouse drag events are forwarded to this view. See | 463 // If non-null mouse drag events are forwarded to this view. See |
460 // UpdateActiveMouseView for details. | 464 // UpdateActiveMouseView for details. |
461 View* active_mouse_view_; | 465 View* active_mouse_view_; |
462 | 466 |
463 DISALLOW_COPY_AND_ASSIGN(MenuController); | 467 DISALLOW_COPY_AND_ASSIGN(MenuController); |
464 }; | 468 }; |
465 | 469 |
466 } // namespace views | 470 } // namespace views |
467 | 471 |
468 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ | 472 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ |
OLD | NEW |