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

Side by Side Diff: base/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/message_pump_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_MESSAGE_PUMP_H_ 5 #ifndef BASE_MESSAGE_PUMP_H_
6 #define BASE_MESSAGE_PUMP_H_ 6 #define BASE_MESSAGE_PUMP_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // DoWork callback is already scheduled. This method may be called from any 112 // DoWork callback is already scheduled. This method may be called from any
113 // thread. Once this call is made, DoWork should not be "starved" at least 113 // thread. Once this call is made, DoWork should not be "starved" at least
114 // until it returns a value of false. 114 // until it returns a value of false.
115 virtual void ScheduleWork() = 0; 115 virtual void ScheduleWork() = 0;
116 116
117 // Schedule a DoDelayedWork callback to happen at the specified time, 117 // Schedule a DoDelayedWork callback to happen at the specified time,
118 // cancelling any pending DoDelayedWork callback. This method may only be 118 // cancelling any pending DoDelayedWork callback. This method may only be
119 // used on the thread that called Run. 119 // used on the thread that called Run.
120 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0; 120 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0;
121 121
122 // Stops the pump and frees any resources that must to be freed on the thread
123 // that called Run(). The method should be called on the same thread that
124 // called Run().
125 //
126 // Note that this method is the last chance to run anything on the thread that
127 // called Run(). MessagePump is a ref-counted class. Its destructor can (and
128 // does) run on arbitraty thread.
darin (slow to review) 2013/06/18 20:31:16 nit: s/arbitraty/arbitrary/ This comment section
alexeypa (please no reviews) 2013/06/18 20:48:52 Done.
129 virtual void Shutdown() = 0;
130
122 protected: 131 protected:
123 virtual ~MessagePump(); 132 virtual ~MessagePump();
124 friend class RefCountedThreadSafe<MessagePump>; 133 friend class RefCountedThreadSafe<MessagePump>;
125 }; 134 };
126 135
127 } // namespace base 136 } // namespace base
128 137
129 #endif // BASE_MESSAGE_PUMP_H_ 138 #endif // BASE_MESSAGE_PUMP_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/message_pump_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698