Move tab drag checking from Ash to Chrome
To avoid duplicating the tab drag MIME types, there are two options:
move the strings to a common dependency between Ash and Chrome, or move
the check to the Chrome side through a delegate.
This CL does the latter as it is more straightforward.
Bug: 1069869
Change-Id: I3d0c77cd2d7c6130d075074698cb8717d30362e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2198650
Commit-Queue: Collin Baker <[email protected]>
Reviewed-by: John Lee <[email protected]>
Reviewed-by: Xiaoqian Dai <[email protected]>
Reviewed-by: Mitsuru Oshima <[email protected]>
Cr-Commit-Position: refs/heads/master@{#768577}
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h
index 8498f86..b84c2e01 100644
--- a/ash/shell_delegate.h
+++ b/ash/shell_delegate.h
@@ -58,6 +58,11 @@
// Check whether the current tab of the browser window can go back.
virtual bool CanGoBack(gfx::NativeWindow window) const = 0;
+ // Checks whether a drag-drop operation is a tab drag.
+ virtual bool IsTabDrag(const ui::OSExchangeData& drop_data);
+
+ // Drops tab in a new browser window. |drop_data| must be from a tab
+ // drag as determined by IsTabDrag() above.
virtual aura::Window* CreateBrowserForTabDrop(
aura::Window* source_window,
const ui::OSExchangeData& drop_data);