| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 // Make sure |page_switcher_view_| is deleted before |pagination_model_|. | 256 // Make sure |page_switcher_view_| is deleted before |pagination_model_|. |
| 257 view_model_.Clear(); | 257 view_model_.Clear(); |
| 258 RemoveAllChildViews(true); | 258 RemoveAllChildViews(true); |
| 259 } | 259 } |
| 260 | 260 |
| 261 void AppsGridView::SetLayout(int cols, int rows_per_page) { | 261 void AppsGridView::SetLayout(int cols, int rows_per_page) { |
| 262 cols_ = cols; | 262 cols_ = cols; |
| 263 rows_per_page_ = rows_per_page; | 263 rows_per_page_ = rows_per_page; |
| 264 | 264 |
| 265 SetBorder(views::Border::CreateEmptyBorder(0, kAppsGridPadding, 0, | 265 SetBorder(views::CreateEmptyBorder(0, kAppsGridPadding, 0, kAppsGridPadding)); |
| 266 kAppsGridPadding)); | |
| 267 } | 266 } |
| 268 | 267 |
| 269 // static | 268 // static |
| 270 gfx::Size AppsGridView::GetTotalTileSize() { | 269 gfx::Size AppsGridView::GetTotalTileSize() { |
| 271 gfx::Rect rect(GetTileViewSize()); | 270 gfx::Rect rect(GetTileViewSize()); |
| 272 rect.Inset(GetTilePadding()); | 271 rect.Inset(GetTilePadding()); |
| 273 return rect.size(); | 272 return rect.size(); |
| 274 } | 273 } |
| 275 | 274 |
| 276 void AppsGridView::ResetForShowApps() { | 275 void AppsGridView::ResetForShowApps() { |
| (...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 | 1915 |
| 1917 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 1916 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
| 1918 bool is_target_folder) { | 1917 bool is_target_folder) { |
| 1919 AppListItemView* target_view = | 1918 AppListItemView* target_view = |
| 1920 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot); | 1919 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot); |
| 1921 if (target_view) | 1920 if (target_view) |
| 1922 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 1921 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
| 1923 } | 1922 } |
| 1924 | 1923 |
| 1925 } // namespace app_list | 1924 } // namespace app_list |
| OLD | NEW |