apps_grid_view_item.h revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
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 "base/memory/scoped_ptr.h"
11#include "ui/app_list/app_list_export.h"
12#import "ui/base/cocoa/tracking_area.h"
13
14namespace app_list {
15class AppListItemModel;
16class ItemModelObserverBridge;
17}
18
19// AppsGridViewItem is the controller for an NSButton representing an app item
20// on an NSCollectionView controlled by an AppsGridController.
21APP_LIST_EXPORT
22@interface AppsGridViewItem : NSCollectionViewItem {
23 @private
24  scoped_ptr<app_list::ItemModelObserverBridge> observerBridge_;
25
26  // Used to highlight the background on hover.
27  ui::ScopedCrTrackingArea trackingArea_;
28}
29
30- (id)initWithSize:(NSSize)tileSize;
31
32- (void)setModel:(app_list::AppListItemModel*)itemModel;
33
34- (app_list::AppListItemModel*)model;
35
36- (NSButton*)button;
37
38@end
39
40#endif  // UI_APP_LIST_COCOA_APPS_GRID_VIEW_ITEM_H_
41