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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm

Issue 2271653006: base::mac::IsOSSierra() -> base::mac::IsOS10_12(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Nits 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 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" 5 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/mac_util.h" 8 #import "base/mac/mac_util.h"
9 #import "base/mac/sdk_forward_declarations.h" 9 #import "base/mac/sdk_forward_declarations.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 currentToolTips_.reset([[NSMutableArray alloc] init]); 45 currentToolTips_.reset([[NSMutableArray alloc] init]);
46 resizeAnimation_.reset([[NSViewAnimation alloc] init]); 46 resizeAnimation_.reset([[NSViewAnimation alloc] init]);
47 [resizeAnimation_ setDuration:kAnimationDuration]; 47 [resizeAnimation_ setDuration:kAnimationDuration];
48 [resizeAnimation_ setAnimationBlockingMode:NSAnimationNonblocking]; 48 [resizeAnimation_ setAnimationBlockingMode:NSAnimationNonblocking];
49 49
50 // Disable Force Touch in the Omnibox. Note that this API is defined in 50 // Disable Force Touch in the Omnibox. Note that this API is defined in
51 // 10.10.3 and higher so have to check more than just isYosmiteOrLater(). 51 // 10.10.3 and higher so have to check more than just isYosmiteOrLater().
52 // Also, because NSPressureConfiguration is not in the original 10.10 SDK, 52 // Also, because NSPressureConfiguration is not in the original 10.10 SDK,
53 // use NSClassFromString() to instantiate it (otherwise there's a 53 // use NSClassFromString() to instantiate it (otherwise there's a
54 // linker error). 54 // linker error).
55 if (base::mac::IsOSYosemiteOrLater() && 55 if (base::mac::IsAtLeastOS10_10() &&
56 [self respondsToSelector:@selector(setPressureConfiguration:)]) { 56 [self respondsToSelector:@selector(setPressureConfiguration:)]) {
57 NSPressureConfiguration* pressureConfiguration = 57 NSPressureConfiguration* pressureConfiguration =
58 [[[NSClassFromString(@"NSPressureConfiguration") alloc] 58 [[[NSClassFromString(@"NSPressureConfiguration") alloc]
59 initWithPressureBehavior:NSPressureBehaviorPrimaryClick] 59 initWithPressureBehavior:NSPressureBehaviorPrimaryClick]
60 autorelease]; 60 autorelease];
61 [self setPressureConfiguration:pressureConfiguration]; 61 [self setPressureConfiguration:pressureConfiguration];
62 } 62 }
63 } 63 }
64 64
65 - (void)flagsChanged:(NSEvent*)theEvent { 65 - (void)flagsChanged:(NSEvent*)theEvent {
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 NSMinY(frame), 586 NSMinY(frame),
587 suggestWidth, 587 suggestWidth,
588 NSHeight(frame)); 588 NSHeight(frame));
589 589
590 gfx::ScopedNSGraphicsContextSaveGState saveGState; 590 gfx::ScopedNSGraphicsContextSaveGState saveGState;
591 NSRectClip(suggestRect); 591 NSRectClip(suggestRect);
592 [cell drawInteriorWithFrame:frame inView:controlView]; 592 [cell drawInteriorWithFrame:frame inView:controlView];
593 } 593 }
594 594
595 } // namespace autocomplete_text_field 595 } // namespace autocomplete_text_field
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/custom_frame_view_unittest.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698