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

Unified Diff: base/message_pump_glib.h

Issue 5110011: A non-GTK version of menus for touchui. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix compile for chromeos 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/message_pump_glib.cc » ('j') | base/message_pump_glib_x.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_glib.h
diff --git a/base/message_pump_glib.h b/base/message_pump_glib.h
index 06635de73565a4d4d8e35dcd6ee3726f246cbb20..4e07f663825eaf6ca87b382c07cf438221684d73 100644
--- a/base/message_pump_glib.h
+++ b/base/message_pump_glib.h
@@ -92,11 +92,27 @@ class MessagePumpForUI : public MessagePump {
// Returns the dispatcher for the current run state (|state_->dispatcher|).
Dispatcher* GetDispatcher();
- private:
// We may make recursive calls to Run, so we save state that needs to be
// separate between them in this structure type.
- struct RunState;
+ struct RunState {
rjkroege 2010/11/23 23:38:54 why did you have to move this into the include? It
sadrul 2010/11/24 00:55:21 the |should_quit| needs to be set from inside Mess
+ Delegate* delegate;
+ Dispatcher* dispatcher;
+
+ // Used to flag that the current Run() invocation should return ASAP.
+ bool should_quit;
+
+ // Used to count how many Run() invocations are on the stack.
+ int run_depth;
+
+ // This keeps the state of whether the pump got signaled that there was new
+ // work to be done. Since we eat the message on the wake up pipe as soon as
+ // we get it, we keep that state here to stay consistent.
+ bool has_work;
+ };
+ RunState* state_;
+
+ private:
// Invoked from EventDispatcher. Notifies all observers we're about to
// process an event.
void WillProcessEvent(GdkEvent* event);
@@ -108,8 +124,6 @@ class MessagePumpForUI : public MessagePump {
// Callback prior to gdk dispatching an event.
static void EventDispatcher(GdkEvent* event, void* data);
- RunState* state_;
-
// This is a GLib structure that we can add event sources to. We use the
// default GLib context, which is the one to which all GTK events are
// dispatched.
« no previous file with comments | « no previous file | base/message_pump_glib.cc » ('j') | base/message_pump_glib_x.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698