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

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

Issue 8378005: wayland: define base:NativeEvent for Wayland (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create a new wayland namespace in base and define WaylandEvent there. Created 9 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 | Annotate | Revision Log
OLDNEW
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
215 // SELECTION_UPDATE_IMMEDIATELY is not set CommitPendingSelection is invoked 215 // SELECTION_UPDATE_IMMEDIATELY is not set CommitPendingSelection is invoked
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 ui::WaylandEvent* event); 225 base::wayland::WaylandEvent* event);
226 #elif defined(TOUCH_UI) || defined(USE_AURA) 226 #elif defined(TOUCH_UI) || 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);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 View* active_mouse_view_; 499 View* active_mouse_view_;
500 500
501 internal::MenuControllerDelegate* delegate_; 501 internal::MenuControllerDelegate* delegate_;
502 502
503 DISALLOW_COPY_AND_ASSIGN(MenuController); 503 DISALLOW_COPY_AND_ASSIGN(MenuController);
504 }; 504 };
505 505
506 } // namespace views 506 } // namespace views
507 507
508 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 508 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698