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

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: fix compile 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
« no previous file with comments | « ui/app_list/search_result.h ('k') | ui/app_list/views/search_result_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bfa1da9b6a7dfc10fb9ce2256c654243ebd04032 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,17 @@ void SearchResult::SetPercentDownloaded(int percent_downloaded) {
OnPercentDownloadedChanged());
}
+int SearchResult::GetPreferredIconDimension() const {
+ switch (display_type_) {
+ case DISPLAY_TILE:
+ return kTileIconSize;
+ case DISPLAY_LIST:
+ return kListIconSize;
+ }
+ NOTREACHED();
+ return 0;
+}
+
void SearchResult::NotifyItemInstalled() {
FOR_EACH_OBSERVER(SearchResultObserver, observers_, OnItemInstalled());
}
« no previous file with comments | « ui/app_list/search_result.h ('k') | ui/app_list/views/search_result_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698