| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ash/app_list/app_list_item_model.h" | |
| 6 | |
| 7 #include "ash/app_list/app_list_item_model_observer.h" | |
| 8 | |
| 9 namespace ash { | |
| 10 | |
| 11 AppListItemModel::AppListItemModel() : highlighted_(false) { | |
| 12 } | |
| 13 | |
| 14 AppListItemModel::~AppListItemModel() { | |
| 15 } | |
| 16 | |
| 17 void AppListItemModel::SetIcon(const SkBitmap& icon) { | |
| 18 icon_ = icon; | |
| 19 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, | |
| 20 ItemIconChanged()); | |
| 21 } | |
| 22 | |
| 23 void AppListItemModel::SetTitle(const std::string& title) { | |
| 24 title_ = title; | |
| 25 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, | |
| 26 ItemTitleChanged()); | |
| 27 } | |
| 28 | |
| 29 void AppListItemModel::SetHighlighted(bool highlighted) { | |
| 30 if (highlighted_ == highlighted) | |
| 31 return; | |
| 32 | |
| 33 highlighted_ = highlighted; | |
| 34 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, | |
| 35 ItemHighlightedChanged()); | |
| 36 } | |
| 37 | |
| 38 void AppListItemModel::AddObserver(AppListItemModelObserver* observer) { | |
| 39 observers_.AddObserver(observer); | |
| 40 } | |
| 41 | |
| 42 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) { | |
| 43 observers_.RemoveObserver(observer); | |
| 44 } | |
| 45 | |
| 46 ui::MenuModel* AppListItemModel::GetContextMenuModel() { | |
| 47 return NULL; | |
| 48 } | |
| 49 | |
| 50 } // namespace ash | |
| OLD | NEW |