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

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

Issue 1154323002: Use app list item shadow for app list folders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_arrow_keys_crash
Patch Set: fix mac compile Created 5 years, 6 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
« no previous file with comments | « ui/app_list/app_list_item.h ('k') | ui/app_list/cocoa/apps_grid_controller_unittest.mm » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.h" 5 #include "ui/app_list/app_list_item.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/app_list/app_list_item_observer.h" 8 #include "ui/app_list/app_list_item_observer.h"
9 9
10 namespace app_list { 10 namespace app_list {
11 11
12 AppListItem::AppListItem(const std::string& id) 12 AppListItem::AppListItem(const std::string& id)
13 : id_(id), 13 : id_(id),
14 has_shadow_(false),
15 highlighted_(false), 14 highlighted_(false),
16 is_installing_(false), 15 is_installing_(false),
17 percent_downloaded_(-1) { 16 percent_downloaded_(-1) {
18 } 17 }
19 18
20 AppListItem::~AppListItem() { 19 AppListItem::~AppListItem() {
21 FOR_EACH_OBSERVER(AppListItemObserver, observers_, ItemBeingDestroyed()); 20 FOR_EACH_OBSERVER(AppListItemObserver, observers_, ItemBeingDestroyed());
22 } 21 }
23 22
24 void AppListItem::SetIcon(const gfx::ImageSkia& icon, bool has_shadow) { 23 void AppListItem::SetIcon(const gfx::ImageSkia& icon) {
25 icon_ = icon; 24 icon_ = icon;
26 has_shadow_ = has_shadow;
27 FOR_EACH_OBSERVER(AppListItemObserver, observers_, ItemIconChanged()); 25 FOR_EACH_OBSERVER(AppListItemObserver, observers_, ItemIconChanged());
28 } 26 }
29 27
30 void AppListItem::SetIsInstalling(bool is_installing) { 28 void AppListItem::SetIsInstalling(bool is_installing) {
31 if (is_installing_ == is_installing) 29 if (is_installing_ == is_installing)
32 return; 30 return;
33 31
34 is_installing_ = is_installing; 32 is_installing_ = is_installing;
35 FOR_EACH_OBSERVER(AppListItemObserver, 33 FOR_EACH_OBSERVER(AppListItemObserver,
36 observers_, 34 observers_,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void AppListItem::SetNameAndShortName(const std::string& name, 102 void AppListItem::SetNameAndShortName(const std::string& name,
105 const std::string& short_name) { 103 const std::string& short_name) {
106 if (name_ == name && short_name_ == short_name) 104 if (name_ == name && short_name_ == short_name)
107 return; 105 return;
108 name_ = name; 106 name_ = name;
109 short_name_ = short_name; 107 short_name_ = short_name;
110 FOR_EACH_OBSERVER(AppListItemObserver, observers_, ItemNameChanged()); 108 FOR_EACH_OBSERVER(AppListItemObserver, observers_, ItemNameChanged());
111 } 109 }
112 110
113 } // namespace app_list 111 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_item.h ('k') | ui/app_list/cocoa/apps_grid_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698