| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |