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

Side by Side Diff: ash/app_list/app_list_model.cc

Issue 9559005: aura: Implement app list M19 mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit in #2 Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/app_list/app_list_model.h" 5 #include "ash/app_list/app_list_model.h"
6 6
7 namespace ash { 7 namespace ash {
8 8
9 AppListModel::AppListModel() { 9 AppListModel::AppListModel() {
10 } 10 }
11 11
12 AppListModel::~AppListModel() { 12 AppListModel::~AppListModel() {
13 } 13 }
14 14
15 void AppListModel::AddGroup(AppListItemGroupModel* group) { 15 void AppListModel::AddItem(AppListItemModel* item) {
16 groups_.Add(group); 16 items_.Add(item);
17 } 17 }
18 18
19 AppListItemGroupModel* AppListModel::GetGroup(int index) { 19 AppListItemModel* AppListModel::GetItem(int index) {
20 DCHECK(index >= 0 && index < group_count()); 20 DCHECK(index >= 0 && index < item_count());
sky 2012/03/01 00:26:57 The same check is in ListModel::item_at, so nuke t
xiyuan 2012/03/01 19:58:47 Done.
21 return groups_.item_at(index); 21 return items_.item_at(index);
22 } 22 }
23 23
24 void AppListModel::AddObserver(ui::ListModelObserver* observer) { 24 void AppListModel::AddObserver(ui::ListModelObserver* observer) {
25 groups_.AddObserver(observer); 25 items_.AddObserver(observer);
26 } 26 }
27 27
28 void AppListModel::RemoveObserver(ui::ListModelObserver* observer) { 28 void AppListModel::RemoveObserver(ui::ListModelObserver* observer) {
29 groups_.RemoveObserver(observer); 29 items_.RemoveObserver(observer);
30 } 30 }
31 31
32 } // namespace ash 32 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698