| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 void AppsGridView::ListItemsRemoved(size_t start, size_t count) { | 316 void AppsGridView::ListItemsRemoved(size_t start, size_t count) { |
| 317 for (size_t i = 0; i < count; ++i) | 317 for (size_t i = 0; i < count; ++i) |
| 318 delete child_at(start); | 318 delete child_at(start); |
| 319 | 319 |
| 320 UpdatePaginationModel(); | 320 UpdatePaginationModel(); |
| 321 | 321 |
| 322 Layout(); | 322 Layout(); |
| 323 SchedulePaint(); | 323 SchedulePaint(); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void AppsGridView::ListItemMoved(size_t index, size_t target_index) { |
| 327 NOTREACHED(); |
| 328 } |
| 329 |
| 326 void AppsGridView::ListItemsChanged(size_t start, size_t count) { | 330 void AppsGridView::ListItemsChanged(size_t start, size_t count) { |
| 327 NOTREACHED(); | 331 NOTREACHED(); |
| 328 } | 332 } |
| 329 | 333 |
| 330 void AppsGridView::TotalPagesChanged() { | 334 void AppsGridView::TotalPagesChanged() { |
| 331 } | 335 } |
| 332 | 336 |
| 333 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) { | 337 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) { |
| 334 Layout(); | 338 Layout(); |
| 335 } | 339 } |
| 336 | 340 |
| 337 void AppsGridView::TransitionChanged() { | 341 void AppsGridView::TransitionChanged() { |
| 338 // Update layout for valid page transition only since over-scroll no longer | 342 // Update layout for valid page transition only since over-scroll no longer |
| 339 // animates app icons. | 343 // animates app icons. |
| 340 const PaginationModel::Transition& transition = | 344 const PaginationModel::Transition& transition = |
| 341 pagination_model_->transition(); | 345 pagination_model_->transition(); |
| 342 if (pagination_model_->is_valid_page(transition.target_page)) | 346 if (pagination_model_->is_valid_page(transition.target_page)) |
| 343 Layout(); | 347 Layout(); |
| 344 } | 348 } |
| 345 | 349 |
| 346 } // namespace app_list | 350 } // namespace app_list |
| OLD | NEW |