static const int kVerticalDetachMagnetism;
TabDragController();
- virtual ~TabDragController();
+ ~TabDragController() override;
// Initializes TabDragController to drag the tabs in |tabs| originating from
// |source_tabstrip|. |source_tab| is the tab that initiated the drag and is
DETACH_ABOVE_OR_BELOW
};
+ // Specifies what should happen when a drag motion exits the tab strip region
+ // in an attempt to detach a tab.
+ enum DetachBehavior {
+ DETACHABLE,
+ NOT_DETACHABLE
+ };
+
// Indicates what should happen after invoking DragBrowserToNewTabStrip().
enum DragBrowserResultType {
// The caller should return immediately. This return value is used if a
void InitTabDragData(Tab* tab, TabDragData* drag_data);
// Overridden from content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
// Overriden from views::WidgetObserver:
- virtual void OnWidgetBoundsChanged(views::Widget* widget,
- const gfx::Rect& new_bounds) OVERRIDE;
+ void OnWidgetBoundsChanged(views::Widget* widget,
+ const gfx::Rect& new_bounds) override;
// Overriden from TabStripModelObserver:
- virtual void TabStripEmpty() OVERRIDE;
+ void TabStripEmpty() override;
// Initialize the offset used to calculate the position to create windows
// in |GetWindowCreatePoint|. This should only be invoked from |Init|.
// object.
chrome::HostDesktopType host_desktop_type_;
- // Aura mouse capture and release is used on Ash platforms as well as on
- // Linux to ensure that pointer grab is not released prematurely.
- bool use_aura_capture_policy_;
+ // Whether capture can be released during the drag. When false, capture should
+ // not be released when transferring capture between widgets and when starting
+ // the move loop.
+ bool can_release_capture_;
// The position of the mouse (in screen coordinates) at the start of the drag
// operation. This is used to calculate minimum elasticity before a
// touch mode.
std::vector<int> initial_tab_positions_;
+ // What should occur during ConinueDragging when a tab is attempted to be
+ // detached.
+ DetachBehavior detach_behavior_;
+
MoveBehavior move_behavior_;
// Updated as the mouse is moved when attached. Indicates whether the mouse