diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 20:27:52 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-18 20:27:52 +0000 |
commit | 59e69e745ba3fa290ff3c50e65c3db03ee9dde6b (patch) | |
tree | 64b82fd1e2375845b59f278f2a1e892dcf54377b /base/message_pump_gtk.h | |
parent | bd41e70e44d19eb809eb8565b1d8479daef5d8f5 (diff) | |
download | chromium_src-59e69e745ba3fa290ff3c50e65c3db03ee9dde6b.zip chromium_src-59e69e745ba3fa290ff3c50e65c3db03ee9dde6b.tar.gz chromium_src-59e69e745ba3fa290ff3c50e65c3db03ee9dde6b.tar.bz2 |
Move message_pump to base/message_loop.
This also fixes some namespace usage inside the message pump files and updates all users of these files to use the new location.
Reland of 206507.
Original review https://codereview.chromium.org/17078005/
TBR=sky
Review URL: https://codereview.chromium.org/16897006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_gtk.h')
-rw-r--r-- | base/message_pump_gtk.h | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/base/message_pump_gtk.h b/base/message_pump_gtk.h deleted file mode 100644 index ba5cff1..0000000 --- a/base/message_pump_gtk.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef BASE_MESSAGE_PUMP_GTK_H_ -#define BASE_MESSAGE_PUMP_GTK_H_ - -#include "base/message_pump_glib.h" - -typedef union _GdkEvent GdkEvent; -typedef struct _XDisplay Display; - -namespace base { - -// The documentation for this class is in message_pump_glib.h -class MessagePumpObserver { - public: - // This method is called before processing a message. - virtual void WillProcessEvent(GdkEvent* event) = 0; - - // This method is called after processing a message. - virtual void DidProcessEvent(GdkEvent* event) = 0; - - protected: - virtual ~MessagePumpObserver() {} -}; - -// The documentation for this class is in message_pump_glib.h -// -// The nested loop is exited by either posting a quit, or returning false -// from Dispatch. -class MessagePumpDispatcher { - public: - // Dispatches the event. If true is returned processing continues as - // normal. If false is returned, the nested loop exits immediately. - virtual bool Dispatch(GdkEvent* event) = 0; - - protected: - virtual ~MessagePumpDispatcher() {} -}; - -// This class implements a message-pump for dispatching GTK events. -class BASE_EXPORT MessagePumpGtk : public MessagePumpGlib { - public: - MessagePumpGtk(); - - // Dispatch an available GdkEvent. Essentially this allows a subclass to do - // some task before/after calling the default handler (EventDispatcher). - void DispatchEvents(GdkEvent* event); - - // Returns default X Display. - static Display* GetDefaultXDisplay(); - - protected: - virtual ~MessagePumpGtk(); - - private: - // Invoked from EventDispatcher. Notifies all observers we're about to - // process an event. - void WillProcessEvent(GdkEvent* event); - - // Invoked from EventDispatcher. Notifies all observers we processed an - // event. - void DidProcessEvent(GdkEvent* event); - - // Callback prior to gdk dispatching an event. - static void EventDispatcher(GdkEvent* event, void* data); - - DISALLOW_COPY_AND_ASSIGN(MessagePumpGtk); -}; - -typedef MessagePumpGtk MessagePumpForUI; - -} // namespace base - -#endif // BASE_MESSAGE_PUMP_GTK_H_ |