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

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

Issue 7250001: Refactor the glib message-pump, and use it as the base for a gtk message pump and an X message pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: media.gyp update Created 9 years, 6 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
« no previous file with comments | « ui/views/focus/accelerator_handler.h ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // to show/hide submenus and update state_. 200 // to show/hide submenus and update state_.
201 void SetSelection(MenuItemView* menu_item, int types); 201 void SetSelection(MenuItemView* menu_item, int types);
202 202
203 // Sets the active MenuController. 203 // Sets the active MenuController.
204 static void SetActiveInstance(MenuController* controller); 204 static void SetActiveInstance(MenuController* controller);
205 205
206 #if defined(OS_WIN) 206 #if defined(OS_WIN)
207 // Dispatcher method. This returns true if the menu was canceled, or 207 // Dispatcher method. This returns true if the menu was canceled, or
208 // if the message is such that the menu should be closed. 208 // if the message is such that the menu should be closed.
209 virtual bool Dispatch(const MSG& msg); 209 virtual bool Dispatch(const MSG& msg);
210 210 #elif defined(TOUCH_UI)
211 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent);
211 #else 212 #else
212 virtual bool Dispatch(GdkEvent* event); 213 virtual bool Dispatch(GdkEvent* event);
213 #endif 214 #endif
214 215
215 #if defined(TOUCH_UI)
216 virtual MessagePumpGlibXDispatcher::DispatchStatus DispatchX(XEvent* xevent);
217 #endif
218
219 // Key processing. The return value of this is returned from Dispatch. 216 // Key processing. The return value of this is returned from Dispatch.
220 // In other words, if this returns false (which happens if escape was 217 // In other words, if this returns false (which happens if escape was
221 // pressed, or a matching mnemonic was found) the message loop returns. 218 // pressed, or a matching mnemonic was found) the message loop returns.
222 #if defined(OS_WIN) 219 #if defined(OS_WIN)
223 bool OnKeyDown(int key_code, const MSG& msg); 220 bool OnKeyDown(int key_code, const MSG& msg);
224 #else 221 #else
225 bool OnKeyDown(int key_code); 222 bool OnKeyDown(int key_code);
226 #endif 223 #endif
227 224
228 // Creates a MenuController. If blocking is true, Run blocks the caller 225 // Creates a MenuController. If blocking is true, Run blocks the caller
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 // If non-null mouse drag events are forwarded to this view. See 484 // If non-null mouse drag events are forwarded to this view. See
488 // UpdateActiveMouseView for details. 485 // UpdateActiveMouseView for details.
489 View* active_mouse_view_; 486 View* active_mouse_view_;
490 487
491 DISALLOW_COPY_AND_ASSIGN(MenuController); 488 DISALLOW_COPY_AND_ASSIGN(MenuController);
492 }; 489 };
493 490
494 } // namespace views 491 } // namespace views
495 492
496 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 493 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/views/focus/accelerator_handler.h ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698