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

Side by Side Diff: ui/aura_shell/app_list/app_list_item_model.h

Issue 8890049: [Aura] Implement views-based applist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 9 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_AURA_SHELL_APP_LIST_APP_LIST_ITEM_MODEL_H_
6 #define UI_AURA_SHELL_APP_LIST_APP_LIST_ITEM_MODEL_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/observer_list.h"
13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/aura_shell/aura_shell_export.h"
15
16 namespace aura_shell {
17
18 class AppListItemModelObserver;
19
20 // AppListItemModel provides icon and title to be shown in a TileView and
21 // action to be executed when the TileView is activated (clicked or enter
22 // key it hit).
23 class AURA_SHELL_EXPORT AppListItemModel {
24 public:
25 AppListItemModel();
26 virtual ~AppListItemModel();
27
28 // Changes icon and title for the model.
29 void SetIcon(const SkBitmap& icon);
30 void SetTitle(const std::string& title);
31
32 void AddObserver(AppListItemModelObserver* observer);
33 void RemoveObserver(AppListItemModelObserver* observer);
34
35 const SkBitmap& icon() const {
36 return icon_;
37 }
38
39 const std::string& title() const {
40 return title_;
41 }
42
43 private:
44 SkBitmap icon_;
45 std::string title_;
46
47 ObserverList<AppListItemModelObserver> observers_;
48
49 DISALLOW_COPY_AND_ASSIGN(AppListItemModel);
50 };
51
52 } // namespace aura_shell
53
54 #endif // #define UI_AURA_SHELL_APP_LIST_APP_LIST_ITEM_MODEL_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/app_list/app_list_item_group_view.cc ('k') | ui/aura_shell/app_list/app_list_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698