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

Side by Side Diff: base/message_pump_mac.h

Issue 149687: delegateless pump (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | « no previous file | base/message_pump_mac.mm » ('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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 // The basis for all native run loops on the Mac is the CFRunLoop. It can be 5 // The basis for all native run loops on the Mac is the CFRunLoop. It can be
6 // used directly, it can be used as the driving force behind the similar 6 // used directly, it can be used as the driving force behind the similar
7 // Foundation NSRunLoop, and it can be used to implement higher-level event 7 // Foundation NSRunLoop, and it can be used to implement higher-level event
8 // loops such as the NSApplication event loop. 8 // loops such as the NSApplication event loop.
9 // 9 //
10 // This file introduces a basic CFRunLoop-based implementation of the 10 // This file introduces a basic CFRunLoop-based implementation of the
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 CFRunLoopSourceRef work_source_; 121 CFRunLoopSourceRef work_source_;
122 CFRunLoopSourceRef delayed_work_source_; 122 CFRunLoopSourceRef delayed_work_source_;
123 CFRunLoopSourceRef idle_work_source_; 123 CFRunLoopSourceRef idle_work_source_;
124 CFRunLoopSourceRef nesting_deferred_work_source_; 124 CFRunLoopSourceRef nesting_deferred_work_source_;
125 CFRunLoopObserverRef pre_wait_observer_; 125 CFRunLoopObserverRef pre_wait_observer_;
126 CFRunLoopObserverRef enter_exit_observer_; 126 CFRunLoopObserverRef enter_exit_observer_;
127 127
128 // (weak) Delegate passed as an argument to the innermost Run call. 128 // (weak) Delegate passed as an argument to the innermost Run call.
129 Delegate* delegate_; 129 Delegate* delegate_;
130 130
131 // "Delegateless" work flags are set when work is ready to be performed but
132 // must wait until a delegate is available to process it. This can happen
133 // when a MessagePumpCFRunLoopBase is instantiated and work arrives without
134 // any call to Run on the stack. The Run method will check for delegateless
135 // work on entry and redispatch it as needed once a delegate is available.
136 bool delegateless_work_;
137 bool delegateless_delayed_work_;
138 bool delegateless_idle_work_;
139
131 DISALLOW_COPY_AND_ASSIGN(MessagePumpCFRunLoopBase); 140 DISALLOW_COPY_AND_ASSIGN(MessagePumpCFRunLoopBase);
132 }; 141 };
133 142
134 class MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase { 143 class MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase {
135 public: 144 public:
136 MessagePumpCFRunLoop(); 145 MessagePumpCFRunLoop();
137 146
138 virtual void DoRun(Delegate* delegate); 147 virtual void DoRun(Delegate* delegate);
139 virtual void Quit(); 148 virtual void Quit();
140 149
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // thread. Otherwise, returns a new instance of MessagePumpNSRunLoop. 208 // thread. Otherwise, returns a new instance of MessagePumpNSRunLoop.
200 static MessagePump* Create(); 209 static MessagePump* Create();
201 210
202 private: 211 private:
203 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac); 212 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac);
204 }; 213 };
205 214
206 } // namespace base 215 } // namespace base
207 216
208 #endif // BASE_MESSAGE_PUMP_MAC_H_ 217 #endif // BASE_MESSAGE_PUMP_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | base/message_pump_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698