diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 23:04:42 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 23:04:42 +0000 |
commit | dbaa96b5ef7e03908aaa9567aa4cc693bcd89fca (patch) | |
tree | 7949aefe6dfc47fe1e43df8067477c08f8586ceb | |
parent | c19386417048319448a58cf119c1854d1e4eb0be (diff) | |
download | chromium_src-dbaa96b5ef7e03908aaa9567aa4cc693bcd89fca.zip chromium_src-dbaa96b5ef7e03908aaa9567aa4cc693bcd89fca.tar.gz chromium_src-dbaa96b5ef7e03908aaa9567aa4cc693bcd89fca.tar.bz2 |
Adds DidProcessEvent to MessagePumpGLib.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/113600
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16429 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/message_pump_glib.cc | 5 | ||||
-rw-r--r-- | base/message_pump_glib.h | 7 | ||||
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.cc | 3 | ||||
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.h | 3 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.cc | 3 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.h | 1 |
6 files changed, 21 insertions, 1 deletions
diff --git a/base/message_pump_glib.cc b/base/message_pump_glib.cc index 0f8e197..e032de4 100644 --- a/base/message_pump_glib.cc +++ b/base/message_pump_glib.cc @@ -225,6 +225,10 @@ void MessagePumpForUI::WillProcessEvent(GdkEvent* event) { FOR_EACH_OBSERVER(Observer, observers_, WillProcessEvent(event)); } +void MessagePumpForUI::DidProcessEvent(GdkEvent* event) { + FOR_EACH_OBSERVER(Observer, observers_, DidProcessEvent(event)); +} + void MessagePumpForUI::Quit() { if (state_) { state_->should_quit = true; @@ -254,6 +258,7 @@ void MessagePumpForUI::ScheduleDelayedWork(const Time& delayed_work_time) { void MessagePumpForUI::EventDispatcher(GdkEvent* event, gpointer data) { reinterpret_cast<MessagePumpForUI*>(data)->WillProcessEvent(event); gtk_main_do_event(event); + reinterpret_cast<MessagePumpForUI*>(data)->DidProcessEvent(event); } } // namespace base diff --git a/base/message_pump_glib.h b/base/message_pump_glib.h index c8a2e0d..4fafaaf 100644 --- a/base/message_pump_glib.h +++ b/base/message_pump_glib.h @@ -26,6 +26,9 @@ class MessagePumpForUI : public MessagePump { // 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; }; MessagePumpForUI(); @@ -72,6 +75,10 @@ class MessagePumpForUI : public MessagePump { // 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, gpointer data); diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc index 220acfd..8ba91cf 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/views/tabs/dragged_tab_controller.cc @@ -449,6 +449,9 @@ void DraggedTabController::DidProcessMessage(const MSG& msg) { } #else void DraggedTabController::WillProcessEvent(GdkEvent* event) { +} + +void DraggedTabController::DidProcessEvent(GdkEvent* event) { NOTIMPLEMENTED(); } #endif diff --git a/chrome/browser/views/tabs/dragged_tab_controller.h b/chrome/browser/views/tabs/dragged_tab_controller.h index a21c0d1..4b2c2f0 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.h +++ b/chrome/browser/views/tabs/dragged_tab_controller.h @@ -116,12 +116,13 @@ class DraggedTabController : public TabContentsDelegate, const NotificationSource& source, const NotificationDetails& details); -#if defined(OS_WIN) // Overridden from MessageLoop::Observer: +#if defined(OS_WIN) virtual void WillProcessMessage(const MSG& msg); virtual void DidProcessMessage(const MSG& msg); #else virtual void WillProcessEvent(GdkEvent* event); + virtual void DidProcessEvent(GdkEvent* event); #endif // Initialize the offset used to calculate the position to create windows diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index bb340d8..47cc89d 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -1062,6 +1062,9 @@ void TabStrip::DidProcessMessage(const MSG& msg) { } #else void TabStrip::WillProcessEvent(GdkEvent* event) { +} + +void TabStrip::DidProcessEvent(GdkEvent* event) { NOTIMPLEMENTED(); } #endif diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h index 51a839f..80d4385 100644 --- a/chrome/browser/views/tabs/tab_strip.h +++ b/chrome/browser/views/tabs/tab_strip.h @@ -149,6 +149,7 @@ class TabStrip : public views::View, virtual void DidProcessMessage(const MSG& msg); #else virtual void WillProcessEvent(GdkEvent* event); + virtual void DidProcessEvent(GdkEvent* event); #endif private: |