OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "ui/base/cocoa/base_view.h" | 5 #include "ui/base/cocoa/base_view.h" |
6 | 6 |
7 NSString* kViewDidBecomeFirstResponder = | 7 NSString* kViewDidBecomeFirstResponder = |
8 @"Chromium.kViewDidBecomeFirstResponder"; | 8 @"Chromium.kViewDidBecomeFirstResponder"; |
9 NSString* kSelectionDirection = @"Chromium.kSelectionDirection"; | 9 NSString* kSelectionDirection = @"Chromium.kSelectionDirection"; |
10 | 10 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 | 134 |
135 - (void)updateTrackingAreas { | 135 - (void)updateTrackingAreas { |
136 [super updateTrackingAreas]; | 136 [super updateTrackingAreas]; |
137 | 137 |
138 // NSTrackingInVisibleRect doesn't work correctly with Lion's window resizing, | 138 // NSTrackingInVisibleRect doesn't work correctly with Lion's window resizing, |
139 // http://crbug.com/176725 / http://openradar.appspot.com/radar?id=2773401 . | 139 // http://crbug.com/176725 / http://openradar.appspot.com/radar?id=2773401 . |
140 // Tear down old tracking area and create a new one as workaround. | 140 // Tear down old tracking area and create a new one as workaround. |
141 if (trackingArea_.get()) | 141 if (trackingArea_.get()) |
142 [self removeTrackingArea:trackingArea_.get()]; | 142 [self removeTrackingArea:trackingArea_.get()]; |
143 trackingArea_.reset([[CrTrackingArea alloc] initWithRect:[self frame] | 143 trackingArea_.reset([[CrTrackingArea alloc] initWithRect:[self bounds] |
144 options:kTrackingOptions | 144 options:kTrackingOptions |
145 owner:self | 145 owner:self |
146 userInfo:nil]); | 146 userInfo:nil]); |
147 [self addTrackingArea:trackingArea_.get()]; | 147 [self addTrackingArea:trackingArea_.get()]; |
148 } | 148 } |
149 | 149 |
150 @end | 150 @end |
OLD | NEW |