Display split view indicators when dragging Mohnstrudel tabs
Snapping the dragged tab to the correct position will be implemented in
a follow-up change.
This also adds a function GetSnapPositionForLocation() that takes just a
location and ignores window-specific properties, unlike
GetSnapPosition(). This is necessary since the DragImageView used by
DragDropController is not snappable itself. Instead, it is just a
placeholder for a new browser window that will be snapped.
Bug: 1069869
Change-Id: I4b9946c9e1f6484a7ec79f8ad71db518d9dd9c7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2150025
Commit-Queue: Collin Baker <[email protected]>
Reviewed-by: Mitsuru Oshima <[email protected]>
Reviewed-by: Xiaoqian Dai <[email protected]>
Cr-Commit-Position: refs/heads/master@{#763510}
diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h
index 87a9542..2d1475f 100644
--- a/ash/drag_drop/drag_drop_controller.h
+++ b/ash/drag_drop/drag_drop_controller.h
@@ -34,6 +34,7 @@
class DragDropTracker;
class DragDropTrackerDelegate;
class DragImageView;
+class SplitViewDragIndicators;
class ASH_EXPORT DragDropController : public aura::client::DragDropClient,
public ui::EventHandler,
@@ -111,8 +112,6 @@
// Helper method to reset everything.
void Cleanup();
- bool IsChromeTabDrag();
-
bool enabled_ = false;
std::unique_ptr<DragImageView> drag_image_;
gfx::Vector2d drag_image_offset_;
@@ -120,6 +119,10 @@
int drag_operation_;
int current_drag_actions_ = 0;
+ // Tab drag specific members.
+ bool is_chrome_tab_drag_ = false;
+ std::unique_ptr<SplitViewDragIndicators> split_view_drag_indicators_;
+
// Window that is currently under the drag cursor.
aura::Window* drag_window_;