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

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

Issue 10956052: Add a ListModel::Move. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + nit in #2 Created 8 years, 2 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/apps_grid_view.h ('k') | ui/app_list/search_result_list_view.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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 void AppsGridView::ListItemsRemoved(size_t start, size_t count) { 318 void AppsGridView::ListItemsRemoved(size_t start, size_t count) {
319 for (size_t i = 0; i < count; ++i) 319 for (size_t i = 0; i < count; ++i)
320 delete child_at(start); 320 delete child_at(start);
321 321
322 UpdatePaginationModel(); 322 UpdatePaginationModel();
323 323
324 Layout(); 324 Layout();
325 SchedulePaint(); 325 SchedulePaint();
326 } 326 }
327 327
328 void AppsGridView::ListItemMoved(size_t index, size_t target_index) {
329 NOTREACHED();
330 }
331
328 void AppsGridView::ListItemsChanged(size_t start, size_t count) { 332 void AppsGridView::ListItemsChanged(size_t start, size_t count) {
329 NOTREACHED(); 333 NOTREACHED();
330 } 334 }
331 335
332 void AppsGridView::TotalPagesChanged() { 336 void AppsGridView::TotalPagesChanged() {
333 } 337 }
334 338
335 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) { 339 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) {
336 Layout(); 340 Layout();
337 } 341 }
338 342
339 void AppsGridView::TransitionChanged() { 343 void AppsGridView::TransitionChanged() {
340 // Update layout for valid page transition only since over-scroll no longer 344 // Update layout for valid page transition only since over-scroll no longer
341 // animates app icons. 345 // animates app icons.
342 const PaginationModel::Transition& transition = 346 const PaginationModel::Transition& transition =
343 pagination_model_->transition(); 347 pagination_model_->transition();
344 if (pagination_model_->is_valid_page(transition.target_page)) 348 if (pagination_model_->is_valid_page(transition.target_page))
345 Layout(); 349 Layout();
346 } 350 }
347 351
348 } // namespace app_list 352 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/apps_grid_view.h ('k') | ui/app_list/search_result_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698