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

Side by Side Diff: ui/base/cocoa/base_view.mm

Issue 2288003002: Delete IsAtLeastOS10_9() and IsAtMostOS10_9() (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 8
9 NSString* kViewDidBecomeFirstResponder = 9 NSString* kViewDidBecomeFirstResponder =
10 @"Chromium.kViewDidBecomeFirstResponder"; 10 @"Chromium.kViewDidBecomeFirstResponder";
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 - (void)updateTrackingAreas { 56 - (void)updateTrackingAreas {
57 [super updateTrackingAreas]; 57 [super updateTrackingAreas];
58 58
59 // NSTrackingInVisibleRect doesn't work correctly with Lion's window resizing, 59 // NSTrackingInVisibleRect doesn't work correctly with Lion's window resizing,
60 // http://crbug.com/176725 / http://openradar.appspot.com/radar?id=2773401 . 60 // http://crbug.com/176725 / http://openradar.appspot.com/radar?id=2773401 .
61 // Work around it by reinstalling the tracking area after window resize. 61 // Work around it by reinstalling the tracking area after window resize.
62 // This AppKit bug is fixed on Yosemite, so we only apply this workaround on 62 // This AppKit bug is fixed on Yosemite, so we only apply this workaround on
63 // 10.9. 63 // 10.9.
64 if (base::mac::IsOS10_9()) { 64 if (!base::mac::IsAtLeastOS10_10()) {
65 [self disableTracking]; 65 [self disableTracking];
66 [self enableTracking]; 66 [self enableTracking];
67 } 67 }
68 } 68 }
69 69
70 - (void)mouseEvent:(NSEvent*)theEvent { 70 - (void)mouseEvent:(NSEvent*)theEvent {
71 // This method left intentionally blank. 71 // This method left intentionally blank.
72 } 72 }
73 73
74 - (EventHandled)keyEvent:(NSEvent*)theEvent { 74 - (EventHandled)keyEvent:(NSEvent*)theEvent {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return new_rect; 194 return new_rect;
195 } 195 }
196 196
197 - (NSRect)flipRectToNSRect:(gfx::Rect)rect { 197 - (NSRect)flipRectToNSRect:(gfx::Rect)rect {
198 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect())); 198 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect()));
199 new_rect.origin.y = NSHeight([self bounds]) - NSMaxY(new_rect); 199 new_rect.origin.y = NSHeight([self bounds]) - NSMaxY(new_rect);
200 return new_rect; 200 return new_rect;
201 } 201 }
202 202
203 @end 203 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698