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

Side by Side Diff: ui/app_list/views/search_result_tile_item_view.cc

Issue 2929273002: Add the Play Store app search to the launcher. (Closed)
Patch Set: Implement methods in FakeAppInstance. Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/search_result_tile_item_view.h" 5 #include "ui/app_list/views/search_result_tile_item_view.h"
6 6
7 #include "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.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_features.h" 9 #include "ui/app_list/app_list_features.h"
10 #include "ui/app_list/app_list_view_delegate.h" 10 #include "ui/app_list/app_list_view_delegate.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (event.key_code() == ui::VKEY_RETURN) { 149 if (event.key_code() == ui::VKEY_RETURN) {
150 view_delegate_->OpenSearchResult(item_, false, event.flags()); 150 view_delegate_->OpenSearchResult(item_, false, event.flags());
151 return true; 151 return true;
152 } 152 }
153 153
154 return false; 154 return false;
155 } 155 }
156 156
157 void SearchResultTileItemView::OnIconChanged() { 157 void SearchResultTileItemView::OnIconChanged() {
158 SetIcon(item_->icon()); 158 SetIcon(item_->icon());
159 Layout();
159 } 160 }
160 161
161 void SearchResultTileItemView::OnBadgeIconChanged() { 162 void SearchResultTileItemView::OnBadgeIconChanged() {
162 SetBadgeIcon(item_->badge_icon()); 163 SetBadgeIcon(item_->badge_icon());
164 Layout();
163 } 165 }
164 166
165 void SearchResultTileItemView::OnRatingChanged() { 167 void SearchResultTileItemView::OnRatingChanged() {
166 SetRating(item_->rating()); 168 SetRating(item_->rating());
167 } 169 }
168 170
169 void SearchResultTileItemView::OnFormattedPriceChanged() { 171 void SearchResultTileItemView::OnFormattedPriceChanged() {
170 SetPrice(item_->formatted_price()); 172 SetPrice(item_->formatted_price());
171 } 173 }
172 174
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if (item_->display_type() == SearchResult::DISPLAY_RECOMMENDATION) 263 if (item_->display_type() == SearchResult::DISPLAY_RECOMMENDATION)
262 return gfx::Size(kGridTileWidth, kGridTileHeight); 264 return gfx::Size(kGridTileWidth, kGridTileHeight);
263 if (item_->display_type() == SearchResult::DISPLAY_TILE) 265 if (item_->display_type() == SearchResult::DISPLAY_TILE)
264 return gfx::Size(kSearchTileWidth, kSearchTileHeight); 266 return gfx::Size(kSearchTileWidth, kSearchTileHeight);
265 } 267 }
266 268
267 return TileItemView::CalculatePreferredSize(); 269 return TileItemView::CalculatePreferredSize();
268 } 270 }
269 271
270 } // namespace app_list 272 } // namespace app_list
OLDNEW
« components/arc/test/fake_app_instance.cc ('K') | « ui/app_list/vector_icons/ic_badge_play.1x.icon ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698