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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 drag_start_page_ = pagination_model_->selected_page(); | 449 drag_start_page_ = pagination_model_->selected_page(); |
450 ExtractDragLocation(event, &drag_start_grid_view_); | 450 ExtractDragLocation(event, &drag_start_grid_view_); |
451 drag_view_start_ = gfx::Point(drag_view_->x(), drag_view_->y()); | 451 drag_view_start_ = gfx::Point(drag_view_->x(), drag_view_->y()); |
452 } | 452 } |
453 | 453 |
454 void AppsGridView::StartSettingUpSynchronousDrag() { | 454 void AppsGridView::StartSettingUpSynchronousDrag() { |
455 #if defined(OS_WIN) | 455 #if defined(OS_WIN) |
456 if (!delegate_) | 456 if (!delegate_) |
457 return; | 457 return; |
458 | 458 |
| 459 // Folders can't be integrated with the OS. |
| 460 if (IsFolderItem(drag_view_->item())) |
| 461 return; |
| 462 |
459 // Favor the drag and drop host over native win32 drag. For the Win8/ash | 463 // Favor the drag and drop host over native win32 drag. For the Win8/ash |
460 // launcher we want to have ashes drag and drop over win32's. | 464 // launcher we want to have ashes drag and drop over win32's. |
461 if (drag_and_drop_host_) | 465 if (drag_and_drop_host_) |
462 return; | 466 return; |
463 | 467 |
464 // Never create a second synchronous drag if the drag started in a folder. | 468 // Never create a second synchronous drag if the drag started in a folder. |
465 if (IsDraggingForReparentInRootLevelGridView()) | 469 if (IsDraggingForReparentInRootLevelGridView()) |
466 return; | 470 return; |
467 | 471 |
468 synchronous_drag_ = new SynchronousDrag(this, drag_view_, drag_view_offset_); | 472 synchronous_drag_ = new SynchronousDrag(this, drag_view_, drag_view_offset_); |
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2093 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 2097 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
2094 bool is_target_folder) { | 2098 bool is_target_folder) { |
2095 AppListItemView* target_view = | 2099 AppListItemView* target_view = |
2096 static_cast<AppListItemView*>( | 2100 static_cast<AppListItemView*>( |
2097 GetViewAtSlotOnCurrentPage(target_index.slot)); | 2101 GetViewAtSlotOnCurrentPage(target_index.slot)); |
2098 if (target_view) | 2102 if (target_view) |
2099 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 2103 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
2100 } | 2104 } |
2101 | 2105 |
2102 } // namespace app_list | 2106 } // namespace app_list |
OLD | NEW |