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

Side by Side Diff: views/controls/menu/native_menu_gtk.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
« no previous file with comments | « views/controls/menu/menu_controller.cc ('k') | views/controls/menu/native_menu_gtk.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) 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_NATIVE_MENU_GTK_H_ 5 #ifndef VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_
6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ 6 #define VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual void Rebuild(); 44 virtual void Rebuild();
45 virtual void UpdateStates(); 45 virtual void UpdateStates();
46 virtual gfx::NativeMenu GetNativeMenu() const; 46 virtual gfx::NativeMenu GetNativeMenu() const;
47 virtual MenuAction GetMenuAction() const; 47 virtual MenuAction GetMenuAction() const;
48 virtual void AddMenuListener(MenuListener* listener); 48 virtual void AddMenuListener(MenuListener* listener);
49 virtual void RemoveMenuListener(MenuListener* listener); 49 virtual void RemoveMenuListener(MenuListener* listener);
50 virtual void SetMinimumWidth(int width); 50 virtual void SetMinimumWidth(int width);
51 51
52 // Overriden from MessageLoopForUI::Dispatcher: 52 // Overriden from MessageLoopForUI::Dispatcher:
53 virtual bool Dispatch(GdkEvent* event); 53 virtual bool Dispatch(GdkEvent* event);
54 #if defined(TOUCH_UI)
55 virtual bool Dispatch(XEvent* xevent);
56 #endif
54 57
55 private: 58 private:
56 CHROMEGTK_CALLBACK_0(NativeMenuGtk, void, OnMenuHidden); 59 CHROMEGTK_CALLBACK_0(NativeMenuGtk, void, OnMenuHidden);
57 CHROMEGTK_CALLBACK_1(NativeMenuGtk, void, OnMenuMoveCurrent, 60 CHROMEGTK_CALLBACK_1(NativeMenuGtk, void, OnMenuMoveCurrent,
58 GtkMenuDirectionType); 61 GtkMenuDirectionType);
59 62
60 void AddSeparatorAt(int index); 63 void AddSeparatorAt(int index);
61 GtkWidget* AddMenuItemAt(int index, GtkRadioMenuItem* radio_group, 64 GtkWidget* AddMenuItemAt(int index, GtkRadioMenuItem* radio_group,
62 GtkAccelGroup* accel_group); 65 GtkAccelGroup* accel_group);
63 66
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // This is to deal with the menu being deleted while the nested 145 // This is to deal with the menu being deleted while the nested
143 // message loop is handled. see http://crosbug.com/7228 . 146 // message loop is handled. see http://crosbug.com/7228 .
144 NestedDispatcherGtk* nested_dispatcher_; 147 NestedDispatcherGtk* nested_dispatcher_;
145 148
146 DISALLOW_COPY_AND_ASSIGN(NativeMenuGtk); 149 DISALLOW_COPY_AND_ASSIGN(NativeMenuGtk);
147 }; 150 };
148 151
149 } // namespace views 152 } // namespace views
150 153
151 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_ 154 #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_GTK_H_
OLDNEW
« no previous file with comments | « views/controls/menu/menu_controller.cc ('k') | views/controls/menu/native_menu_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698