| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // Make the drag view visible again. | 263 // Make the drag view visible again. |
| 264 drag_view_->SetVisible(true); | 264 drag_view_->SetVisible(true); |
| 265 drag_view_->OnSyncDragEnd(); | 265 drag_view_->OnSyncDragEnd(); |
| 266 | 266 |
| 267 grid_view_->EndDrag(canceled_ || !IsCursorWithinGridView()); | 267 grid_view_->EndDrag(canceled_ || !IsCursorWithinGridView()); |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 void EndDragExternally() { | 271 void EndDragExternally() { |
| 272 CancelDrag(); | 272 CancelDrag(); |
| 273 DCHECK(drag_view_); |
| 274 drag_view_->SetVisible(true); |
| 273 drag_view_ = NULL; | 275 drag_view_ = NULL; |
| 274 } | 276 } |
| 275 | 277 |
| 276 private: | 278 private: |
| 277 // Overridden from ui::DragSourceWin. | 279 // Overridden from ui::DragSourceWin. |
| 278 virtual void OnDragSourceCancel() OVERRIDE { | 280 virtual void OnDragSourceCancel() OVERRIDE { |
| 279 canceled_ = true; | 281 canceled_ = true; |
| 280 } | 282 } |
| 281 | 283 |
| 282 virtual void OnDragSourceDrop() OVERRIDE { | 284 virtual void OnDragSourceDrop() OVERRIDE { |
| (...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2162 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 2164 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
| 2163 bool is_target_folder) { | 2165 bool is_target_folder) { |
| 2164 AppListItemView* target_view = | 2166 AppListItemView* target_view = |
| 2165 static_cast<AppListItemView*>( | 2167 static_cast<AppListItemView*>( |
| 2166 GetViewAtSlotOnCurrentPage(target_index.slot)); | 2168 GetViewAtSlotOnCurrentPage(target_index.slot)); |
| 2167 if (target_view) | 2169 if (target_view) |
| 2168 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 2170 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
| 2169 } | 2171 } |
| 2170 | 2172 |
| 2171 } // namespace app_list | 2173 } // namespace app_list |
| OLD | NEW |