Index: ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm |
diff --git a/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm b/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm |
index 74610013e06521da21dc1227d590499723dfc70f..bbc9ad81b17b6ff75323944d3622c2ac70ca273f 100644 |
--- a/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm |
+++ b/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm |
@@ -5,9 +5,12 @@ |
#import "ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.h" |
#include "base/logging.h" |
-#import "base/mac/scoped_nsobject.h" |
#import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
@implementation ContextualSearchHighlighterView { |
// Store size of the container view. If size change, text layout will likely |
// change and should be updated. |
@@ -18,7 +21,7 @@ |
CGFloat _zoom; |
CGFloat _offset; |
- __unsafe_unretained id<ContextualSearchHighlighterDelegate> _delegate; |
+ __weak id<ContextualSearchHighlighterDelegate> _delegate; |
} |
- (instancetype)initWithFrame:(CGRect)frame |
@@ -70,7 +73,7 @@ |
rect.size.height *= zoom; |
rect.origin.x -= scroll.x; |
rect.origin.y += offset - scroll.y; |
- UIView* view = [[[UIView alloc] initWithFrame:rect] autorelease]; |
+ UIView* view = [[UIView alloc] initWithFrame:rect]; |
[self addSubview:view]; |
view.backgroundColor = |
[UIColor colorWithRed:0.67 green:0.88 blue:0.96 alpha:0.6]; |