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

Unified Diff: ui/app_list/search_result.cc

Issue 458983004: Move app list search result icon sizes to app_list_constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/app_list/search_result.cc
diff --git a/ui/app_list/search_result.cc b/ui/app_list/search_result.cc
index 771251fcb9bcd37ffcfa606ba83d51410c4fcb90..d663d0e91684ebdc2929804d926ae0dacc1aa3b3 100644
--- a/ui/app_list/search_result.cc
+++ b/ui/app_list/search_result.cc
@@ -4,6 +4,7 @@
#include "ui/app_list/search_result.h"
+#include "ui/app_list/app_list_constants.h"
#include "ui/app_list/search_result_observer.h"
namespace app_list {
@@ -67,6 +68,18 @@ void SearchResult::SetPercentDownloaded(int percent_downloaded) {
OnPercentDownloadedChanged());
}
+int SearchResult::GetPreferredIconSize() {
+ switch (display_type_) {
+ case DISPLAY_TILE:
+ return kTileIconSize;
+ case DISPLAY_LIST:
+ return kListIconSize;
+ default:
tapted 2014/08/13 08:15:22 nit: you don't need a default case here. It's bett
calamity 2014/08/13 08:25:09 Done.
+ NOTREACHED();
+ return 0;
+ }
+}
+
void SearchResult::NotifyItemInstalled() {
FOR_EACH_OBSERVER(SearchResultObserver, observers_, OnItemInstalled());
}

Powered by Google App Engine
This is Rietveld 408576698