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 19 matching lines...) Expand all Loading... |
30 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ | 30 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ |
31 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ | 31 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ |
32 | 32 |
33 #include "base/message_loop/message_pump.h" | 33 #include "base/message_loop/message_pump.h" |
34 | 34 |
35 #include "base/basictypes.h" | 35 #include "base/basictypes.h" |
36 | 36 |
37 #include <CoreFoundation/CoreFoundation.h> | 37 #include <CoreFoundation/CoreFoundation.h> |
38 | 38 |
39 #include "base/memory/weak_ptr.h" | 39 #include "base/memory/weak_ptr.h" |
| 40 #include "base/message_loop/timer_slack.h" |
40 | 41 |
41 #if defined(__OBJC__) | 42 #if defined(__OBJC__) |
42 #if defined(OS_IOS) | 43 #if defined(OS_IOS) |
43 #import <Foundation/Foundation.h> | 44 #import <Foundation/Foundation.h> |
44 #else | 45 #else |
45 #import <AppKit/AppKit.h> | 46 #import <AppKit/AppKit.h> |
46 | 47 |
47 // Clients must subclass NSApplication and implement this protocol if they use | 48 // Clients must subclass NSApplication and implement this protocol if they use |
48 // MessagePumpMac. | 49 // MessagePumpMac. |
49 @protocol CrAppProtocol | 50 @protocol CrAppProtocol |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 BASE_EXPORT static bool IsHandlingSendEvent(); | 343 BASE_EXPORT static bool IsHandlingSendEvent(); |
343 #endif // !defined(OS_IOS) | 344 #endif // !defined(OS_IOS) |
344 | 345 |
345 private: | 346 private: |
346 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac); | 347 DISALLOW_IMPLICIT_CONSTRUCTORS(MessagePumpMac); |
347 }; | 348 }; |
348 | 349 |
349 } // namespace base | 350 } // namespace base |
350 | 351 |
351 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ | 352 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_MAC_H_ |
OLD | NEW |