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

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

Issue 10820049: Load 2x resources on demand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | ui/app_list/app_list_item_view.cc » ('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_item_model.h" 5 #include "ui/app_list/app_list_item_model.h"
6 6
7 #include "base/logging.h"
7 #include "ui/app_list/app_list_item_model_observer.h" 8 #include "ui/app_list/app_list_item_model_observer.h"
8 9
9 namespace app_list { 10 namespace app_list {
10 11
11 AppListItemModel::AppListItemModel() : highlighted_(false) { 12 AppListItemModel::AppListItemModel() : highlighted_(false) {
12 } 13 }
13 14
14 AppListItemModel::~AppListItemModel() { 15 AppListItemModel::~AppListItemModel() {
15 } 16 }
16 17
17 void AppListItemModel::SetIcon(const gfx::ImageSkia& icon) { 18 void AppListItemModel::SetIcon(const gfx::ImageSkia& icon) {
18 icon_ = icon; 19 icon_ = icon;
20 DCHECK(icon.IsThreadSafe());
19 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemIconChanged()); 21 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemIconChanged());
20 } 22 }
21 23
22 void AppListItemModel::SetTitle(const std::string& title) { 24 void AppListItemModel::SetTitle(const std::string& title) {
23 if (title_ == title) 25 if (title_ == title)
24 return; 26 return;
25 27
26 title_ = title; 28 title_ = title;
27 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemTitleChanged()); 29 FOR_EACH_OBSERVER(AppListItemModelObserver, observers_, ItemTitleChanged());
28 } 30 }
(...skipping 14 matching lines...) Expand all
43 45
44 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) { 46 void AppListItemModel::RemoveObserver(AppListItemModelObserver* observer) {
45 observers_.RemoveObserver(observer); 47 observers_.RemoveObserver(observer);
46 } 48 }
47 49
48 ui::MenuModel* AppListItemModel::GetContextMenuModel() { 50 ui::MenuModel* AppListItemModel::GetContextMenuModel() {
49 return NULL; 51 return NULL;
50 } 52 }
51 53
52 } // namespace app_list 54 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | ui/app_list/app_list_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698