WebUI tab strip: Better distinguish tab reordering and tab-dragging
This CL implements the logic to only shrink the browser when
the tab is dragged out of the WebUI tab strip. Also simplify
the logic in TabStripUILayout since we are already using a fixed
height for thumbnail.
Bug: 1211530
Change-Id: I9148f340760ae5c7b7112b9bc09ebe87cbda5db5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2988812
Reviewed-by: Peter Kasting <[email protected]>
Reviewed-by: Xiaoqian Dai <[email protected]>
Commit-Queue: Yuheng Huang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#899200}
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index f1e55f6..4fc320ad 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -88,6 +88,10 @@
// Checks whether a drag-drop operation is a tab drag.
virtual bool IsTabDrag(const ui::OSExchangeData& drop_data);
+ // Return the height of WebUI tab strip used to determine if a tab has
+ // dragged out of it.
+ virtual int GetBrowserWebUITabStripHeight() = 0;
+
// Drops tab in a new browser window. |drop_data| must be from a tab
// drag as determined by IsTabDrag() above.
virtual aura::Window* CreateBrowserForTabDrop(