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

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

Issue 10408009: ui: Change ListModel to operate in size_t instead of int. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittest Created 8 years, 7 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
« no previous file with comments | « ui/app_list/app_list_model.h ('k') | ui/app_list/app_list_model_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 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 "ui/app_list/app_list_model.h" 5 #include "ui/app_list/app_list_model.h"
6 6
7 namespace app_list { 7 namespace app_list {
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::AddItem(AppListItemModel* item) { 15 void AppListModel::AddItem(AppListItemModel* item) {
16 items_.Add(item); 16 items_.Add(item);
17 } 17 }
18 18
19 void AppListModel::AddItemAt(int index, AppListItemModel* item) { 19 void AppListModel::AddItemAt(size_t index, AppListItemModel* item) {
20 items_.AddAt(index, item); 20 items_.AddAt(index, item);
21 } 21 }
22 22
23 void AppListModel::DeleteItemAt(int index) { 23 void AppListModel::DeleteItemAt(size_t index) {
24 items_.DeleteAt(index); 24 items_.DeleteAt(index);
25 } 25 }
26 26
27 AppListItemModel* AppListModel::GetItemAt(int index) { 27 AppListItemModel* AppListModel::GetItemAt(size_t index) {
28 return items_.GetItemAt(index); 28 return items_.GetItemAt(index);
29 } 29 }
30 30
31 void AppListModel::AddObserver(ui::ListModelObserver* observer) { 31 void AppListModel::AddObserver(ui::ListModelObserver* observer) {
32 items_.AddObserver(observer); 32 items_.AddObserver(observer);
33 } 33 }
34 34
35 void AppListModel::RemoveObserver(ui::ListModelObserver* observer) { 35 void AppListModel::RemoveObserver(ui::ListModelObserver* observer) {
36 items_.RemoveObserver(observer); 36 items_.RemoveObserver(observer);
37 } 37 }
38 38
39 } // namespace app_list 39 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_model.h ('k') | ui/app_list/app_list_model_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698