| 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/views/apps_grid_view.h" | 5 #include "ui/app_list/views/apps_grid_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 if (item_list_) | 379 if (item_list_) |
| 380 item_list_->RemoveObserver(this); | 380 item_list_->RemoveObserver(this); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void AppsGridView::SetLayout(int icon_size, int cols, int rows_per_page) { | 383 void AppsGridView::SetLayout(int icon_size, int cols, int rows_per_page) { |
| 384 icon_size_.SetSize(icon_size, icon_size); | 384 icon_size_.SetSize(icon_size, icon_size); |
| 385 cols_ = cols; | 385 cols_ = cols; |
| 386 rows_per_page_ = rows_per_page; | 386 rows_per_page_ = rows_per_page; |
| 387 | 387 |
| 388 set_border(views::Border::CreateEmptyBorder(kTopPadding, | 388 SetBorder(views::Border::CreateEmptyBorder(kTopPadding, |
| 389 kLeftRightPadding, | 389 kLeftRightPadding, |
| 390 0, | 390 0, |
| 391 kLeftRightPadding)); | 391 kLeftRightPadding)); |
| 392 } | 392 } |
| 393 | 393 |
| 394 void AppsGridView::SetModel(AppListModel* model) { | 394 void AppsGridView::SetModel(AppListModel* model) { |
| 395 if (model_) | 395 if (model_) |
| 396 model_->RemoveObserver(this); | 396 model_->RemoveObserver(this); |
| 397 | 397 |
| 398 model_ = model; | 398 model_ = model; |
| 399 if (model_) | 399 if (model_) |
| 400 model_->AddObserver(this); | 400 model_->AddObserver(this); |
| 401 | 401 |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1695 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 1695 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
| 1696 bool is_target_folder) { | 1696 bool is_target_folder) { |
| 1697 AppListItemView* target_view = | 1697 AppListItemView* target_view = |
| 1698 static_cast<AppListItemView*>( | 1698 static_cast<AppListItemView*>( |
| 1699 GetViewAtSlotOnCurrentPage(target_index.slot)); | 1699 GetViewAtSlotOnCurrentPage(target_index.slot)); |
| 1700 if (target_view) | 1700 if (target_view) |
| 1701 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 1701 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
| 1702 } | 1702 } |
| 1703 | 1703 |
| 1704 } // namespace app_list | 1704 } // namespace app_list |
| OLD | NEW |