Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_COCOA_VIEWS_SCROLLBAR_BRIDGE_DELEGATE_H_ | |
| 6 #define UI_VIEWS_COCOA_VIEWS_SCROLLBAR_BRIDGE_DELEGATE_H_ | |
| 7 | |
| 8 #import <Cocoa/Cocoa.h> | |
| 9 | |
| 10 #import "base/mac/scoped_nsobject.h" | |
| 11 #include "ui/views/views_export.h" | |
| 12 | |
| 13 // The delegate set to ViewsScrollbarBridge. | |
| 14 class ViewsScrollbarBridgeDelegate { | |
| 15 public: | |
| 16 virtual void OnScrollerStyleChanged() = 0; | |
| 17 }; | |
| 18 | |
| 19 // A bridge to NSScroller managed by NativeCocoaScrollbar. Serves as a helper | |
| 20 // class to bridge NSScroller notifications and functions to | |
| 21 // NativeCocoaScrollbar. | |
| 22 @interface ViewsScrollbarBridge : NSObject { | |
| 23 @private | |
| 24 ViewsScrollbarBridgeDelegate* delegate_; // Weak. Owns this. | |
| 25 } | |
| 26 | |
| 27 // Initialize with the given |delegate|. | |
| 28 - (id)initWithDelegate:(ViewsScrollbarBridgeDelegate*)delegate; | |
| 29 | |
| 30 // Called when we receive a NSPreferredScrollerStyleDidChangeNotification. | |
| 31 - (void)onScrollerStyleChanged:(NSNotification*)notification; | |
|
tapted
2016/02/08 00:31:15
nit: move to private `@interface ViewsScrollbarBri
spqchan
2016/02/09 21:21:25
Done.
| |
| 32 | |
| 33 // Returns the style of scrollers that OSX is using. | |
| 34 - (NSScrollerStyle)getPreferredScrollerStyle; | |
| 35 | |
| 36 @end | |
| 37 | |
| 38 #endif | |
| OLD | NEW |