Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 // any call to Run on the stack. The Run method will check for delegateless | 214 // any call to Run on the stack. The Run method will check for delegateless |
| 215 // work on entry and redispatch it as needed once a delegate is available. | 215 // work on entry and redispatch it as needed once a delegate is available. |
| 216 bool delegateless_work_; | 216 bool delegateless_work_; |
| 217 bool delegateless_idle_work_; | 217 bool delegateless_idle_work_; |
| 218 | 218 |
| 219 DISALLOW_COPY_AND_ASSIGN(MessagePumpCFRunLoopBase); | 219 DISALLOW_COPY_AND_ASSIGN(MessagePumpCFRunLoopBase); |
| 220 }; | 220 }; |
| 221 | 221 |
| 222 class MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase { | 222 class MessagePumpCFRunLoop : public MessagePumpCFRunLoopBase { |
| 223 public: | 223 public: |
| 224 MessagePumpCFRunLoop(); | 224 BASE_EXPORT MessagePumpCFRunLoop(); |
|
brettw
2014/05/13 22:36:19
Usually if you want to export a class you write "c
ccameron
2014/05/13 23:24:07
That seemed to be the precedent for the file (whic
| |
| 225 virtual ~MessagePumpCFRunLoop(); | 225 virtual ~MessagePumpCFRunLoop(); |
| 226 | 226 |
| 227 virtual void DoRun(Delegate* delegate) OVERRIDE; | 227 virtual void DoRun(Delegate* delegate) OVERRIDE; |
| 228 virtual void Quit() OVERRIDE; | 228 virtual void Quit() OVERRIDE; |
| 229 | 229 |
| 230 private: | 230 private: |
| 231 virtual void EnterExitRunLoop(CFRunLoopActivity activity) OVERRIDE; | 231 virtual void EnterExitRunLoop(CFRunLoopActivity activity) OVERRIDE; |
| 232 | 232 |
| 233 // True if Quit is called to stop the innermost MessagePump | 233 // True if Quit is called to stop the innermost MessagePump |
| 234 // (innermost_quittable_) but some other CFRunLoopRun loop (nesting_level_) | 234 // (innermost_quittable_) but some other CFRunLoopRun loop (nesting_level_) |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 342 BASE_EXPORT static bool IsHandlingSendEvent(); | 342 BASE_EXPORT static bool IsHandlingSendEvent(); |
| 343 #endif // !defined(OS_IOS) | 343 #endif // !defined(OS_IOS) |
| 344 | 344 |
| 345 private: | 345 private: |
| 346 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac); | 346 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac); |
| 347 }; | 347 }; |
| 348 | 348 |
| 349 } // namespace base | 349 } // namespace base |
| 350 | 350 |
| 351 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ | 351 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ |
| OLD | NEW |