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

Unified Diff: base/message_loop/message_pump.h

Issue 15709015: Make sure that the UI window created by base::MessagePumpForUI is destoyed on the same thread (Wind… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 months 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 | « base/message_loop/message_loop.cc ('k') | base/message_loop/message_pump_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump.h
diff --git a/base/message_loop/message_pump.h b/base/message_loop/message_pump.h
index 5b722321495240db85ba80a943a1b7b0efe5c332..a59d71bf7b3001312642d7dbee57cb1dd62fc701 100644
--- a/base/message_loop/message_pump.h
+++ b/base/message_loop/message_pump.h
@@ -119,6 +119,12 @@ class BASE_EXPORT MessagePump : public RefCountedThreadSafe<MessagePump> {
// used on the thread that called Run.
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0;
+ // Stops the pump after exiting the last run loop. This method must be used on
+ // the same thread that called Run(). The method frees any resources
+ // affinitized to that thread because ~MessagePump() might be invoked on an
+ // arbitrary thread.
+ virtual void Shutdown() = 0;
+
protected:
virtual ~MessagePump();
friend class RefCountedThreadSafe<MessagePump>;
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/message_loop/message_pump_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698