diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-05 04:00:59 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-05 04:00:59 +0000 |
commit | 7443494b88d2c04f3c07ebf98f0e6d68478eed7d (patch) | |
tree | 9211568b7d60a93dc8bf03a57a725dc8c8d967b7 /base/message_pump_glib_x_dispatch.h | |
parent | 6f7e1d63f9c97c7f8f11af86f78f80934064a9a9 (diff) | |
download | chromium_src-7443494b88d2c04f3c07ebf98f0e6d68478eed7d.zip chromium_src-7443494b88d2c04f3c07ebf98f0e6d68478eed7d.tar.gz chromium_src-7443494b88d2c04f3c07ebf98f0e6d68478eed7d.tar.bz2 |
A non-GTK version of menus for touchui.
For the menus to work correctly, the X messge pump also needs updating to allow
nested event dispatching.
BUG=None
TEST=On a touchui build, non-GTK context menus in web-pages should work correctly.
Review URL: http://codereview.chromium.org/5110011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_glib_x_dispatch.h')
-rw-r--r-- | base/message_pump_glib_x_dispatch.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/base/message_pump_glib_x_dispatch.h b/base/message_pump_glib_x_dispatch.h index 95364a2..faee5b5 100644 --- a/base/message_pump_glib_x_dispatch.h +++ b/base/message_pump_glib_x_dispatch.h @@ -18,9 +18,18 @@ namespace base { // GdkEvents. This class provides additional mechanism for dispatching XEvents. class MessagePumpGlibXDispatcher : public MessagePumpForUI::Dispatcher { public: - // Dispatches the event. If true is returned processing continues as - // normal. If false is returned, the nested loop exits immediately. - virtual bool Dispatch(XEvent* xevent) = 0; + + typedef enum { + EVENT_IGNORED, // The event was not processed. + EVENT_PROCESSED, // The event has been processed. + EVENT_QUIT // The event was processed and the message-loop should + // terminate. + } DispatchStatus; + + // Dispatches the event. EVENT_IGNORED is returned if the event was ignored + // (i.e. not processed). EVENT_PROCESSED is returned if the event was + // processed. The nested loop exits immediately if EVENT_QUIT is returned. + virtual DispatchStatus Dispatch(XEvent* xevent) = 0; }; } // namespace base |