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

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

Issue 2787693002: Remove more dead app list code. (Closed)
Patch Set: updated comment Created 3 years, 8 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_folder_item.h ('k') | ui/app_list/app_list_item.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 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_folder_item.h" 5 #include "ui/app_list/app_list_folder_item.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "ui/app_list/app_list_constants.h" 8 #include "ui/app_list/app_list_constants.h"
9 #include "ui/app_list/app_list_item_list.h" 9 #include "ui/app_list/app_list_item_list.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 AppListItem* AppListFolderItem::FindChildItem(const std::string& id) { 55 AppListItem* AppListFolderItem::FindChildItem(const std::string& id) {
56 return item_list_->FindItem(id); 56 return item_list_->FindItem(id);
57 } 57 }
58 58
59 size_t AppListFolderItem::ChildItemCount() const { 59 size_t AppListFolderItem::ChildItemCount() const {
60 return item_list_->item_count(); 60 return item_list_->item_count();
61 } 61 }
62 62
63 void AppListFolderItem::OnExtensionPreferenceChanged() {
64 for (size_t i = 0; i < item_list_->item_count(); ++i)
65 item_list_->item_at(i)->OnExtensionPreferenceChanged();
66 }
67
68 bool AppListFolderItem::CompareForTest(const AppListItem* other) const { 63 bool AppListFolderItem::CompareForTest(const AppListItem* other) const {
69 if (!AppListItem::CompareForTest(other)) 64 if (!AppListItem::CompareForTest(other))
70 return false; 65 return false;
71 const AppListFolderItem* other_folder = 66 const AppListFolderItem* other_folder =
72 static_cast<const AppListFolderItem*>(other); 67 static_cast<const AppListFolderItem*>(other);
73 if (other_folder->item_list()->item_count() != item_list_->item_count()) 68 if (other_folder->item_list()->item_count() != item_list_->item_count())
74 return false; 69 return false;
75 for (size_t i = 0; i < item_list_->item_count(); ++i) { 70 for (size_t i = 0; i < item_list_->item_count(); ++i) {
76 if (!item_list()->item_at(i)->CompareForTest( 71 if (!item_list()->item_at(i)->CompareForTest(
77 other_folder->item_list()->item_at(i))) 72 other_folder->item_list()->item_at(i)))
78 return false; 73 return false;
79 } 74 }
80 return true; 75 return true;
81 } 76 }
82 77
83 std::string AppListFolderItem::GenerateId() { 78 std::string AppListFolderItem::GenerateId() {
84 return base::GenerateGUID(); 79 return base::GenerateGUID();
85 } 80 }
86 81
87 void AppListFolderItem::OnFolderImageUpdated() { 82 void AppListFolderItem::OnFolderImageUpdated() {
88 SetIcon(folder_image_.icon()); 83 SetIcon(folder_image_.icon());
89 } 84 }
90 85
91 } // namespace app_list 86 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_folder_item.h ('k') | ui/app_list/app_list_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698