Index: ui/app_list/views/apps_grid_view.cc |
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc |
index d3857553c2bdc1aa6fe2da271c795393a5a0f30f..a9116d15b21fbc42373927a39466c0a9790acd15 100644 |
--- a/ui/app_list/views/apps_grid_view.cc |
+++ b/ui/app_list/views/apps_grid_view.cc |
@@ -217,6 +217,8 @@ class SynchronousDrag : public ui::DragSourceWin { |
shortcut_path_ = shortcut_path; |
} |
+ bool running() { return running_; } |
+ |
bool CanRun() { |
return has_shortcut_path_ && !running_; |
} |
@@ -491,10 +493,20 @@ void AppsGridView::StartSettingUpSynchronousDrag() { |
bool AppsGridView::RunSynchronousDrag() { |
#if defined(OS_WIN) |
- if (synchronous_drag_ && synchronous_drag_->CanRun()) { |
+ if (!synchronous_drag_) |
+ return false; |
+ |
+ if (synchronous_drag_->CanRun()) { |
+ if (IsDraggingForReparentInHiddenGridView()) |
+ folder_delegate_->SetRootLevelDragViewVisible(false); |
synchronous_drag_->Run(); |
synchronous_drag_ = NULL; |
return true; |
+ } else if (!synchronous_drag_->running()) { |
tapted
2014/05/02 01:52:47
nit: I think the condition is redundant (i.e. can
calamity
2014/05/02 04:28:38
Ah, true.
|
+ // The OS drag is not ready yet. If the root grid has a drag view because |
+ // a reparent has started, ensure it is visible. |
+ if (IsDraggingForReparentInHiddenGridView()) |
+ folder_delegate_->SetRootLevelDragViewVisible(true); |
} |
#endif |
return false; |
@@ -766,6 +778,11 @@ void AppsGridView::ClearDragState(bool cancel_reparent) { |
dragging_for_reparent_item_ = false; |
} |
+void AppsGridView::SetDragViewVisible(bool visible) { |
+ DCHECK(drag_view_); |
+ SetViewHidden(drag_view_, !visible, true); |
+} |
+ |
void AppsGridView::SetDragAndDropHostOfCurrentAppList( |
ApplicationDragAndDropHost* drag_and_drop_host) { |
drag_and_drop_host_ = drag_and_drop_host; |