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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 void EndDragExternally() { | 285 void EndDragExternally() { |
286 CancelDrag(); | 286 CancelDrag(); |
287 DCHECK(drag_view_); | 287 DCHECK(drag_view_); |
288 drag_view_->SetVisible(true); | 288 drag_view_->SetVisible(true); |
289 drag_view_ = NULL; | 289 drag_view_ = NULL; |
290 } | 290 } |
291 | 291 |
292 private: | 292 private: |
293 // Overridden from ui::DragSourceWin. | 293 // Overridden from ui::DragSourceWin. |
294 virtual void OnDragSourceCancel() override { | 294 void OnDragSourceCancel() override { canceled_ = true; } |
295 canceled_ = true; | |
296 } | |
297 | 295 |
298 virtual void OnDragSourceDrop() override { | 296 void OnDragSourceDrop() override {} |
299 } | |
300 | 297 |
301 virtual void OnDragSourceMove() override { | 298 void OnDragSourceMove() override { |
302 grid_view_->UpdateDrag(AppsGridView::MOUSE, GetCursorInGridViewCoords()); | 299 grid_view_->UpdateDrag(AppsGridView::MOUSE, GetCursorInGridViewCoords()); |
303 } | 300 } |
304 | 301 |
305 void SetupExchangeData(ui::OSExchangeData* data) { | 302 void SetupExchangeData(ui::OSExchangeData* data) { |
306 data->SetFilename(shortcut_path_); | 303 data->SetFilename(shortcut_path_); |
307 gfx::ImageSkia image(drag_view_->GetDragImage()); | 304 gfx::ImageSkia image(drag_view_->GetDragImage()); |
308 gfx::Size image_size(image.size()); | 305 gfx::Size image_size(image.size()); |
309 drag_utils::SetDragImageOnDataObject( | 306 drag_utils::SetDragImageOnDataObject( |
310 image, | 307 image, |
311 drag_view_offset_ - drag_view_->GetDragImageOffset(), | 308 drag_view_offset_ - drag_view_->GetDragImageOffset(), |
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2171 | 2168 |
2172 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 2169 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
2173 bool is_target_folder) { | 2170 bool is_target_folder) { |
2174 AppListItemView* target_view = | 2171 AppListItemView* target_view = |
2175 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot); | 2172 GetViewDisplayedAtSlotOnCurrentPage(target_index.slot); |
2176 if (target_view) | 2173 if (target_view) |
2177 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 2174 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
2178 } | 2175 } |
2179 | 2176 |
2180 } // namespace app_list | 2177 } // namespace app_list |
OLD | NEW |