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

Side by Side Diff: ui/views/cocoa/views_scrollbar_bridge.mm

Issue 1849343003: mac: Remove IsOSSnowLeopard(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/views/cocoa/views_scrollbar_bridge.h" 5 #import "ui/views/cocoa/views_scrollbar_bridge.h"
6 6
7 #include "base/mac/mac_util.h"
8 #import "base/mac/sdk_forward_declarations.h" 7 #import "base/mac/sdk_forward_declarations.h"
9 8
10 @interface ViewsScrollbarBridge () 9 @interface ViewsScrollbarBridge ()
11 10
12 // Called when we receive a NSPreferredScrollerStyleDidChangeNotification. 11 // Called when we receive a NSPreferredScrollerStyleDidChangeNotification.
13 - (void)onScrollerStyleChanged:(NSNotification*)notification; 12 - (void)onScrollerStyleChanged:(NSNotification*)notification;
14 13
15 @end 14 @end
16 15
17 @implementation ViewsScrollbarBridge 16 @implementation ViewsScrollbarBridge
(...skipping 19 matching lines...) Expand all
37 delegate_ = nullptr; 36 delegate_ = nullptr;
38 [[NSNotificationCenter defaultCenter] removeObserver:self]; 37 [[NSNotificationCenter defaultCenter] removeObserver:self];
39 } 38 }
40 39
41 - (void)onScrollerStyleChanged:(NSNotification*)notification { 40 - (void)onScrollerStyleChanged:(NSNotification*)notification {
42 if (delegate_) 41 if (delegate_)
43 delegate_->OnScrollerStyleChanged(); 42 delegate_->OnScrollerStyleChanged();
44 } 43 }
45 44
46 + (NSScrollerStyle)getPreferredScrollerStyle { 45 + (NSScrollerStyle)getPreferredScrollerStyle {
47 if (![NSScroller respondsToSelector:@selector(preferredScrollerStyle)]) {
48 DCHECK(base::mac::IsOSSnowLeopard());
49 return NSScrollerStyleLegacy;
50 }
51 return [NSScroller preferredScrollerStyle]; 46 return [NSScroller preferredScrollerStyle];
52 } 47 }
53 48
54 @end 49 @end
OLDNEW
« no previous file with comments | « ui/views/cocoa/bridged_native_widget_unittest.mm ('k') | ui/views/widget/native_widget_mac_interactive_uitest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698