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

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

Issue 23709003: Display an app's short name in the app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 7 years, 3 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
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_item_model.h" 5 #include "ui/app_list/app_list_item_model.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/app_list/app_list_item_model_observer.h" 8 #include "ui/app_list/app_list_item_model_observer.h"
9 9
10 namespace app_list { 10 namespace app_list {
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 void AppListItemModel::SetTitle(const std::string& title) { 27 void AppListItemModel::SetTitle(const std::string& title) {
28 if (title_ == title) 28 if (title_ == title)
29 return; 29 return;
30 30
31 title_ = title; 31 title_ = title;
32 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemTitleChanged()); 32 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemTitleChanged());
33 } 33 }
34 34
35 void AppListItemModel::SetFullName(const std::string& full_name) {
36 if (full_name_ == full_name)
37 return;
38
39 full_name_ = full_name;
40 FOR_EACH_OBSERVER(AppListItemModelObserver,
41 observers_,
42 ItemFullNameChanged());
43 }
44
35 void AppListItemModel::SetHighlighted(bool highlighted) { 45 void AppListItemModel::SetHighlighted(bool highlighted) {
36 if (highlighted_ == highlighted) 46 if (highlighted_ == highlighted)
37 return; 47 return;
38 48
39 highlighted_ = highlighted; 49 highlighted_ = highlighted;
40 FOR_EACH_OBSERVER(AppListItemModelObserver, 50 FOR_EACH_OBSERVER(AppListItemModelObserver,
41 observers_, 51 observers_,
42 ItemHighlightedChanged()); 52 ItemHighlightedChanged());
43 } 53 }
44 54
(...skipping 23 matching lines...) Expand all
68 78
69 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) { 79 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) {
70 observers_.RemoveObserver(observer); 80 observers_.RemoveObserver(observer);
71 } 81 }
72 82
73 ui::MenuModel* AppListItemModel::GetContextMenuModel() { 83 ui::MenuModel* AppListItemModel::GetContextMenuModel() {
74 return NULL; 84 return NULL;
75 } 85 }
76 86
77 } // namespace app_list 87 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698