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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 virtual void OnDragSourceMove() OVERRIDE { | 288 virtual void OnDragSourceMove() OVERRIDE { |
289 grid_view_->UpdateDrag(AppsGridView::MOUSE, GetCursorInGridViewCoords()); | 289 grid_view_->UpdateDrag(AppsGridView::MOUSE, GetCursorInGridViewCoords()); |
290 } | 290 } |
291 | 291 |
292 void SetupExchangeData(ui::OSExchangeData* data) { | 292 void SetupExchangeData(ui::OSExchangeData* data) { |
293 data->SetFilename(shortcut_path_); | 293 data->SetFilename(shortcut_path_); |
294 gfx::ImageSkia image(drag_view_->GetDragImage()); | 294 gfx::ImageSkia image(drag_view_->GetDragImage()); |
295 gfx::Size image_size(image.size()); | 295 gfx::Size image_size(image.size()); |
296 drag_utils::SetDragImageOnDataObject( | 296 drag_utils::SetDragImageOnDataObject( |
297 image, | 297 image, |
298 image.size(), | |
299 drag_view_offset_ - drag_view_->GetDragImageOffset(), | 298 drag_view_offset_ - drag_view_->GetDragImageOffset(), |
300 data); | 299 data); |
301 } | 300 } |
302 | 301 |
303 HWND GetGridViewHWND() { | 302 HWND GetGridViewHWND() { |
304 return views::HWNDForView(grid_view_); | 303 return views::HWNDForView(grid_view_); |
305 } | 304 } |
306 | 305 |
307 bool IsCursorWithinGridView() { | 306 bool IsCursorWithinGridView() { |
308 POINT p; | 307 POINT p; |
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2160 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, | 2159 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, |
2161 bool is_target_folder) { | 2160 bool is_target_folder) { |
2162 AppListItemView* target_view = | 2161 AppListItemView* target_view = |
2163 static_cast<AppListItemView*>( | 2162 static_cast<AppListItemView*>( |
2164 GetViewAtSlotOnCurrentPage(target_index.slot)); | 2163 GetViewAtSlotOnCurrentPage(target_index.slot)); |
2165 if (target_view) | 2164 if (target_view) |
2166 target_view->SetAsAttemptedFolderTarget(is_target_folder); | 2165 target_view->SetAsAttemptedFolderTarget(is_target_folder); |
2167 } | 2166 } |
2168 | 2167 |
2169 } // namespace app_list | 2168 } // namespace app_list |
OLD | NEW |