Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: views/controls/menu/menu_controller.h

Issue 3801011: touchui: Directly process key and mouse events. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: nit Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/views/native_menu_domui.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698