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

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

Issue 7464027: Wayland support for views. views_desktop on Wayland. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged native_menu_wayland and native_menu_x and styling fixes Created 9 years, 4 months 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // to show/hide submenus and update state_. 208 // to show/hide submenus and update state_.
209 void SetSelection(MenuItemView* menu_item, int types); 209 void SetSelection(MenuItemView* menu_item, int types);
210 210
211 // Sets the active MenuController. 211 // Sets the active MenuController.
212 static void SetActiveInstance(MenuController* controller); 212 static void SetActiveInstance(MenuController* controller);
213 213
214 #if defined(OS_WIN) 214 #if defined(OS_WIN)
215 // Dispatcher method. This returns true if the menu was canceled, or 215 // Dispatcher method. This returns true if the menu was canceled, or
216 // if the message is such that the menu should be closed. 216 // if the message is such that the menu should be closed.
217 virtual bool Dispatch(const MSG& msg); 217 virtual bool Dispatch(const MSG& msg);
218 #elif defined(USE_WAYLAND)
219 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(
220 ui::WaylandEvent* event);
218 #elif defined(TOUCH_UI) 221 #elif defined(TOUCH_UI)
219 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); 222 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent);
220 #else 223 #else
221 virtual bool Dispatch(GdkEvent* event); 224 virtual bool Dispatch(GdkEvent* event);
222 #endif 225 #endif
223 226
224 // Key processing. The return value of this is returned from Dispatch. 227 // Key processing. The return value of this is returned from Dispatch.
225 // In other words, if this returns false (which happens if escape was 228 // In other words, if this returns false (which happens if escape was
226 // pressed, or a matching mnemonic was found) the message loop returns. 229 // pressed, or a matching mnemonic was found) the message loop returns.
227 #if defined(OS_WIN) 230 #if defined(OS_WIN)
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // If non-null mouse drag events are forwarded to this view. See 495 // If non-null mouse drag events are forwarded to this view. See
493 // UpdateActiveMouseView for details. 496 // UpdateActiveMouseView for details.
494 View* active_mouse_view_; 497 View* active_mouse_view_;
495 498
496 DISALLOW_COPY_AND_ASSIGN(MenuController); 499 DISALLOW_COPY_AND_ASSIGN(MenuController);
497 }; 500 };
498 501
499 } // namespace views 502 } // namespace views
500 503
501 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 504 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698