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

Unified Diff: base/message_loop/message_pump_mac.h

Issue 255393002: Hide NSAutoreleasePool from ARC translation units. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the return type in the method definitions to match the declarations. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/message_loop/message_pump_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_mac.h
diff --git a/base/message_loop/message_pump_mac.h b/base/message_loop/message_pump_mac.h
index 424cb70938d058a90288ceb5314bf73c8ae3200c..47095fe8f50c10898adb3cefa4d76ae508147f6b 100644
--- a/base/message_loop/message_pump_mac.h
+++ b/base/message_loop/message_pump_mac.h
@@ -38,9 +38,7 @@
#include "base/memory/weak_ptr.h"
-#if !defined(__OBJC__)
-class NSAutoreleasePool;
-#else // !defined(__OBJC__)
+#if defined(__OBJC__)
#if defined(OS_IOS)
#import <Foundation/Foundation.h>
#else
@@ -55,7 +53,7 @@ class NSAutoreleasePool;
- (BOOL)isHandlingSendEvent;
@end
#endif // !defined(OS_IOS)
-#endif // !defined(__OBJC__)
+#endif // defined(__OBJC__)
namespace base {
@@ -63,6 +61,12 @@ class MessagePumpInstrumentation;
class RunLoop;
class TimeTicks;
+#if !defined(__OBJC__) || __has_feature(objc_arc)
+class AutoreleasePool;
Mark Mentovai 2014/04/28 21:12:12 Call this AutoreleasePoolType so that it doesn’t l
+#else // !defined(__OBJC__) || __has_feature(objc_arc)
+typedef NSAutoreleasePool AutoreleasePool;
+#endif // !defined(__OBJC__) || __has_feature(objc_arc)
+
class MessagePumpCFRunLoopBase : public MessagePump {
// Needs access to CreateAutoreleasePool.
friend class MessagePumpScopedAutoreleasePool;
@@ -94,7 +98,7 @@ class MessagePumpCFRunLoopBase : public MessagePump {
// In some cases, CreateAutoreleasePool may return nil intentionally to
// preventing an autorelease pool from being created, allowing any
// objects autoreleased by work to fall into the current autorelease pool.
- virtual NSAutoreleasePool* CreateAutoreleasePool();
+ virtual AutoreleasePool* CreateAutoreleasePool();
// Enables instrumentation of the MessagePump. See MessagePumpInstrumentation
// in the implementation for details.
@@ -296,7 +300,7 @@ class MessagePumpCrApplication : public MessagePumpNSApplication {
protected:
// Returns nil if NSApp is currently in the middle of calling
// -sendEvent. Requires NSApp implementing CrAppProtocol.
- virtual NSAutoreleasePool* CreateAutoreleasePool() OVERRIDE;
+ virtual AutoreleasePool* CreateAutoreleasePool() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(MessagePumpCrApplication);
« no previous file with comments | « no previous file | base/message_loop/message_pump_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698