OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_ | 5 #ifndef UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_ |
6 #define UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_ | 6 #define UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "ui/base/cocoa/tracking_area.h" | 10 #import "ui/base/cocoa/tracking_area.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // highlight that mirrors the visible portion of the page. | 27 // highlight that mirrors the visible portion of the page. |
28 @interface AppListPagerView : NSSegmentedControl { | 28 @interface AppListPagerView : NSSegmentedControl { |
29 @private | 29 @private |
30 // Used to auto-select a segment on hover. | 30 // Used to auto-select a segment on hover. |
31 ui::ScopedCrTrackingArea trackingArea_; | 31 ui::ScopedCrTrackingArea trackingArea_; |
32 | 32 |
33 // The segment currently highlighted with a mouse hover, or -1 for none. | 33 // The segment currently highlighted with a mouse hover, or -1 for none. |
34 NSInteger hoveredSegment_; | 34 NSInteger hoveredSegment_; |
35 } | 35 } |
36 | 36 |
| 37 // Returns -1 if |locationInWindow| is not over a segment. Otherwise returns the |
| 38 // segment index and highlights it. |
| 39 - (NSInteger)findAndHighlightSegmentAtLocation:(NSPoint)locationInWindow; |
| 40 |
37 @end | 41 @end |
38 | 42 |
39 #endif // UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_ | 43 #endif // UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_ |
OLD | NEW |