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

Side by Side Diff: ui/app_list/cocoa/apps_grid_view_item.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_APPS_GRID_VIEW_ITEM_H_
6 #define UI_APP_LIST_COCOA_APPS_GRID_VIEW_ITEM_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include <memory>
11
12 #include "ui/app_list/app_list_export.h"
13 #import "ui/base/cocoa/tracking_area.h"
14
15 namespace app_list {
16 class AppListItem;
17 class ItemModelObserverBridge;
18 }
19
20 // AppsGridViewItem is the controller for an NSButton representing an app item
21 // on an NSCollectionView controlled by an AppsGridController.
22 APP_LIST_EXPORT
23 @interface AppsGridViewItem : NSCollectionViewItem {
24 @private
25 std::unique_ptr<app_list::ItemModelObserverBridge> observerBridge_;
26 base::scoped_nsobject<NSProgressIndicator> progressIndicator_;
27
28 // Used to highlight the background on hover.
29 ui::ScopedCrTrackingArea trackingArea_;
30 }
31
32 @property(readonly, nonatomic) NSProgressIndicator* progressIndicator;
33
34 // Designated initializer. |tileSize| is the size of tiles in the grid.
35 - (id)initWithSize:(NSSize)tileSize;
36
37 // Set the represented model, updating views. Clears if |itemModel| is NULL.
38 - (void)setModel:(app_list::AppListItem*)itemModel;
39
40 // Model accessor, via the |observerBridge_|.
41 - (app_list::AppListItem*)model;
42
43 // Return the button portion of the item, showing the icon and title.
44 - (NSButton*)button;
45
46 // Generate and return a context menu, populated using the represented model.
47 - (NSMenu*)contextMenu;
48
49 // Take a snapshot of the grid cell with correct layout, then hide the button.
50 // If |isRestore| is true, the snapshot includes the label and items hidden for
51 // the initial snapshot are restored.
52 - (NSBitmapImageRep*)dragRepresentationForRestore:(BOOL)isRestore;
53
54 @end
55
56 #endif // UI_APP_LIST_COCOA_APPS_GRID_VIEW_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698