OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef BASE_IOS_WEAK_NSOBJECT_H_ | 5 #ifndef BASE_IOS_WEAK_NSOBJECT_H_ |
6 #define BASE_IOS_WEAK_NSOBJECT_H_ | 6 #define BASE_IOS_WEAK_NSOBJECT_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #import <objc/runtime.h> | 9 #import <objc/runtime.h> |
10 | 10 |
11 #include "base/basictypes.h" | |
12 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
13 #include "base/logging.h" | 12 #include "base/logging.h" |
14 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
15 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
16 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
17 | 16 |
18 // WeakNSObject<> is patterned after scoped_nsobject<>, but instead of | 17 // WeakNSObject<> is patterned after scoped_nsobject<>, but instead of |
19 // maintaining ownership of an NSObject subclass object, it will nil itself out | 18 // maintaining ownership of an NSObject subclass object, it will nil itself out |
20 // when the object is deallocated. | 19 // when the object is deallocated. |
21 // | 20 // |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 179 |
181 WeakNSObject& operator=(const WeakNSObject<id>& that) { | 180 WeakNSObject& operator=(const WeakNSObject<id>& that) { |
182 WeakNSProtocol<id>::operator=(that); | 181 WeakNSProtocol<id>::operator=(that); |
183 return *this; | 182 return *this; |
184 } | 183 } |
185 }; | 184 }; |
186 | 185 |
187 } // namespace base | 186 } // namespace base |
188 | 187 |
189 #endif // BASE_IOS_WEAK_NSOBJECT_H_ | 188 #endif // BASE_IOS_WEAK_NSOBJECT_H_ |
OLD | NEW |