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

Unified Diff: base/message_pump_glib.h

Issue 10854: Restructor the the pump for nested loops. (Closed)
Patch Set: x Created 12 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.cc » ('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 21a80dfa15c511c4ae2e3b169420c77aa7159641..d632095532e0bba9c2199d36f21f04d55c5e8c9a 100644
--- a/base/message_pump_glib.h
+++ b/base/message_pump_glib.h
@@ -25,6 +25,14 @@ class MessagePumpForUI : public MessagePump {
virtual void ScheduleWork();
virtual void ScheduleDelayedWork(const Time& delayed_work_time);
+ // Internal methods used for processing the pump callbacks. They are
+ // public for simplicity but should not be used directly. HandlePrepare
+ // is called during the prepare step of glib, and returns a timeout that
+ // will be passed to the poll. HandleDispatch is called after the poll
+ // has completed.
+ int HandlePrepare();
+ void HandleDispatch();
+
private:
// We may make recursive calls to Run, so we save state that needs to be
// separate between them in this structure type.
@@ -36,6 +44,10 @@ class MessagePumpForUI : public MessagePump {
// Used to count how many Run() invocations are on the stack.
int run_depth;
+
+ // Used internally for controlling whether we want a message pump
+ // iteration to be blocking or not.
+ bool more_work_is_plausible;
};
RunState* state_;
« no previous file with comments | « no previous file | base/message_pump_glib.cc » ('j') | base/message_pump_glib.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698