| 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 11 matching lines...) Expand all Loading... |
| 22 // | 22 // |
| 23 // Typically, MessagePumpNSApplication only makes sense on a Cocoa | 23 // Typically, MessagePumpNSApplication only makes sense on a Cocoa |
| 24 // application's main thread. If a CFRunLoop-based message pump is needed on | 24 // application's main thread. If a CFRunLoop-based message pump is needed on |
| 25 // any other thread, one of the other concrete subclasses is preferrable. | 25 // any other thread, one of the other concrete subclasses is preferrable. |
| 26 // MessagePumpMac::Create is defined, which returns a new NSApplication-based | 26 // MessagePumpMac::Create is defined, which returns a new NSApplication-based |
| 27 // or NSRunLoop-based MessagePump subclass depending on which thread it is | 27 // or NSRunLoop-based MessagePump subclass depending on which thread it is |
| 28 // called on. | 28 // called on. |
| 29 | 29 |
| 30 #ifndef BASE_MESSAGE_PUMP_MAC_H_ | 30 #ifndef BASE_MESSAGE_PUMP_MAC_H_ |
| 31 #define BASE_MESSAGE_PUMP_MAC_H_ | 31 #define BASE_MESSAGE_PUMP_MAC_H_ |
| 32 #pragma once | |
| 33 | 32 |
| 34 #include "base/message_pump.h" | 33 #include "base/message_pump.h" |
| 35 | 34 |
| 36 #include <CoreFoundation/CoreFoundation.h> | 35 #include <CoreFoundation/CoreFoundation.h> |
| 37 | 36 |
| 38 #if !defined(__OBJC__) | 37 #if !defined(__OBJC__) |
| 39 class NSAutoreleasePool; | 38 class NSAutoreleasePool; |
| 40 #else // !defined(__OBJC__) | 39 #else // !defined(__OBJC__) |
| 41 #import <AppKit/AppKit.h> | 40 #import <AppKit/AppKit.h> |
| 42 | 41 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // Requires NSApp to implement CrAppProtocol. | 291 // Requires NSApp to implement CrAppProtocol. |
| 293 BASE_EXPORT static bool IsHandlingSendEvent(); | 292 BASE_EXPORT static bool IsHandlingSendEvent(); |
| 294 | 293 |
| 295 private: | 294 private: |
| 296 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac); | 295 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac); |
| 297 }; | 296 }; |
| 298 | 297 |
| 299 } // namespace base | 298 } // namespace base |
| 300 | 299 |
| 301 #endif // BASE_MESSAGE_PUMP_MAC_H_ | 300 #endif // BASE_MESSAGE_PUMP_MAC_H_ |
| OLD | NEW |