Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / tabs / tab_drag_controller.h
index c8c8ec6..3bba7a7 100644 (file)
@@ -71,7 +71,7 @@ class TabDragController : public content::NotificationObserver,
   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
@@ -164,6 +164,13 @@ class TabDragController : public content::NotificationObserver,
     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
@@ -201,16 +208,16 @@ class TabDragController : public content::NotificationObserver,
   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|.
@@ -461,9 +468,10 @@ class TabDragController : public content::NotificationObserver,
   // 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
@@ -533,6 +541,10 @@ class TabDragController : public content::NotificationObserver,
   // 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