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

Side by Side Diff: ui/app_list/cocoa/app_list_pager_view.h

Issue 2131463002: Purge the App Launcher code from Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Zap mac-specific icon assets Created 4 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_
6 #define UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #import "ui/base/cocoa/tracking_area.h"
11
12 @class AppListPagerView;
13
14 // Delegate to obtain the visible portion of a page and respond to clicks.
15 @protocol AppListPagerDelegate<NSObject>
16
17 // Returns the portion of a page that is visible, in the range (-1.0, 1.0].
18 // Positive indicates the left side is visible, negative indicates the right.
19 - (CGFloat)visiblePortionOfPage:(int)page;
20
21 // Invoked when the pager is clicked.
22 - (void)onPagerClicked:(AppListPagerView*)sender;
23
24 @end
25
26 // AppListPagerView draws a button strip with buttons representing pages, and a
27 // highlight that mirrors the visible portion of the page.
28 @interface AppListPagerView : NSSegmentedControl {
29 @private
30 // Used to auto-select a segment on hover.
31 ui::ScopedCrTrackingArea trackingArea_;
32
33 // The segment currently highlighted with a mouse hover, or -1 for none.
34 NSInteger hoveredSegment_;
35 }
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
41 @end
42
43 #endif // UI_APP_LIST_COCOA_APP_LIST_PAGER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698