| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 const int kMinMouseWheelToSwitchPage = 20; | 29 const int kMinMouseWheelToSwitchPage = 20; |
| 30 const int kMinScrollToSwitchPage = 20; | 30 const int kMinScrollToSwitchPage = 20; |
| 31 const int kMinHorizVelocityToSwitchPage = 1100; | 31 const int kMinHorizVelocityToSwitchPage = 1100; |
| 32 | 32 |
| 33 } // namespace | 33 } // namespace |
| 34 | 34 |
| 35 namespace app_list { | 35 namespace app_list { |
| 36 | 36 |
| 37 AppsGridView::AppsGridView(views::ButtonListener* listener, | 37 AppsGridView::AppsGridView(views::ButtonListener* listener, |
| 38 PaginationModel* pagination_model) | 38 PaginationModel* pagination_model) |
| 39 : model_(NULL), | 39 : model_(NULL), |
| 40 listener_(listener), | 40 listener_(listener), |
| 41 pagination_model_(pagination_model), | 41 pagination_model_(pagination_model), |
| 42 cols_(0), | 42 cols_(0), |
| 43 rows_per_page_(0), | 43 rows_per_page_(0), |
| 44 selected_item_index_(-1) { | 44 selected_item_index_(-1) { |
| 45 pagination_model_->AddObserver(this); | 45 pagination_model_->AddObserver(this); |
| 46 } | 46 } |
| 47 | 47 |
| 48 AppsGridView::~AppsGridView() { | 48 AppsGridView::~AppsGridView() { |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) { | 369 void AppsGridView::SelectedPageChanged(int old_selected, int new_selected) { |
| 370 Layout(); | 370 Layout(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void AppsGridView::TransitionChanged() { | 373 void AppsGridView::TransitionChanged() { |
| 374 Layout(); | 374 Layout(); |
| 375 } | 375 } |
| 376 | 376 |
| 377 } // namespace app_list | 377 } // namespace app_list |
| OLD | NEW |