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

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

Issue 8890049: [Aura] Implement views-based applist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased and refactored 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 #include "ui/aura_shell/app_list/app_list_item_model.h"
6
7 #include "ui/aura_shell/app_list/app_list_item_model_observer.h"
8
9 namespace aura_shell {
10
11 AppListItemModel::AppListItemModel(const SkBitmap& icon,
12 const std::string& title)
13 : icon_(icon),
14 title_(title) {
15 }
16
17 AppListItemModel::~AppListItemModel() {
18 }
19
20 void AppListItemModel::SetIcon(const SkBitmap& icon) {
21 icon_ = icon;
22 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_,
23 ItemIconChanged());
24 }
25
26 void AppListItemModel::SetTitle(const std::string& title) {
27 title_ = title;
28 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_,
29 ItemTitleChanged());
30 }
31
32 void AppListItemModel::Activate(int event_flags) {
33 }
34
35 void AppListItemModel::AddObserver(AppListItemModelObserver* observer) {
36 observers_.AddObserver(observer);
37 }
38
39 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) {
40 observers_.RemoveObserver(observer);
41 }
42
43 } // namespace aura_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698