[Drag Drop] Notify observers of drop completion
This CL adds a new API in `aura::client::DragDropClientObserver`:
OnDropCompleted(). OnDropCompleted() is called when drop is performed.
This CL should not bring any noticeable UI change.
Bug: b/264934296
Change-Id: I41fab882898d6d2b29756c4aa24c940774ebcbe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4261790
Reviewed-by: Scott Violet <[email protected]>
Commit-Queue: Andrew Xu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1110109}
diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h
index 0be258cc..030b196 100644
--- a/ash/drag_drop/drag_drop_controller.h
+++ b/ash/drag_drop/drag_drop_controller.h
@@ -159,9 +159,9 @@
void CleanupPendingLongTap();
- // Helper method to perform the drop if allowed by
- // DataTransferPolicyController. If it's run, `drag_cancel` will be replaced.
- // Otherwise `drag_cancel` will run to cancel the drag.
+ // Performs data drop. NOTE: this method does not run in an async drop if
+ // disallowed by `ui::DataTransferPolicyController`. `cancel_drag_callback`
+ // runs if this method does not run.
void PerformDrop(const gfx::Point drop_location_in_screen,
ui::DropTargetEvent event,
std::unique_ptr<ui::OSExchangeData> drag_data,
@@ -169,7 +169,7 @@
aura::client::DragDropDelegate::DropCallbackWithAnimation
drop_cb_animation,
std::unique_ptr<TabDragDropDelegate> tab_drag_drop_delegate,
- base::ScopedClosureRunner drag_cancel);
+ base::ScopedClosureRunner cancel_drag_callback);
void CancelIfInProgress();