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

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

Issue 10900018: Introduce App Launcher for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase gyp file for ui extraction Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/app_list_view_delegate.h ('k') | ui/views/bubble/bubble_delegate.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/apps_grid_view.h" 5 #include "ui/app_list/apps_grid_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/app_list/app_list_item_view.h" 9 #include "ui/app_list/app_list_item_view.h"
10 #include "ui/app_list/pagination_model.h" 10 #include "ui/app_list/pagination_model.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 pagination_model_->SetTotalPages( 269 pagination_model_->SetTotalPages(
270 (child_count() - 1) / tiles_per_page() + 1); 270 (child_count() - 1) / tiles_per_page() + 1);
271 } 271 }
272 272
273 AppListItemView* AppsGridView::CreateViewForItemAtIndex(size_t index) { 273 AppListItemView* AppsGridView::CreateViewForItemAtIndex(size_t index) {
274 DCHECK_LT(index, model_->item_count()); 274 DCHECK_LT(index, model_->item_count());
275 AppListItemView* item = new AppListItemView(this, 275 AppListItemView* item = new AppListItemView(this,
276 model_->GetItemAt(index), 276 model_->GetItemAt(index),
277 listener_); 277 listener_);
278 item->SetIconSize(icon_size_); 278 item->SetIconSize(icon_size_);
279 #if !defined(OS_WIN)
279 item->SetPaintToLayer(true); 280 item->SetPaintToLayer(true);
280 item->SetFillsBoundsOpaquely(false); 281 item->SetFillsBoundsOpaquely(false);
282 #endif
281 return item; 283 return item;
282 } 284 }
283 285
284 AppListItemView* AppsGridView::GetItemViewAtIndex(int index) { 286 AppListItemView* AppsGridView::GetItemViewAtIndex(int index) {
285 return static_cast<AppListItemView*>(child_at(index)); 287 return static_cast<AppListItemView*>(child_at(index));
286 } 288 }
287 289
288 void AppsGridView::SetSelectedItemByIndex(int index) { 290 void AppsGridView::SetSelectedItemByIndex(int index) {
289 if (selected_item_index_ == index) 291 if (selected_item_index_ == index)
290 return; 292 return;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 339
338 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) { 340 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) {
339 Layout(); 341 Layout();
340 } 342 }
341 343
342 void AppsGridView::TransitionChanged() { 344 void AppsGridView::TransitionChanged() {
343 Layout(); 345 Layout();
344 } 346 }
345 347
346 } // namespace app_list 348 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_view_delegate.h ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698