| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 int source_tab_offset, | 102 int source_tab_offset, |
| 103 const ui::ListSelectionModel& initial_selection_model, | 103 const ui::ListSelectionModel& initial_selection_model, |
| 104 DetachBehavior detach_behavior, | 104 DetachBehavior detach_behavior, |
| 105 MoveBehavior move_behavior, | 105 MoveBehavior move_behavior, |
| 106 EventSource event_source); | 106 EventSource event_source); |
| 107 | 107 |
| 108 // Returns true if there is a drag underway and the drag is attached to | 108 // Returns true if there is a drag underway and the drag is attached to |
| 109 // |tab_strip|. | 109 // |tab_strip|. |
| 110 // NOTE: this returns false if the TabDragController is in the process of | 110 // NOTE: this returns false if the TabDragController is in the process of |
| 111 // finishing the drag. | 111 // finishing the drag. |
| 112 static bool IsAttachedTo(TabStrip* tab_strip); | 112 static bool IsAttachedTo(const TabStrip* tab_strip); |
| 113 | 113 |
| 114 // Returns true if there is a drag underway. | 114 // Returns true if there is a drag underway. |
| 115 static bool IsActive(); | 115 static bool IsActive(); |
| 116 | 116 |
| 117 // Used to determine whether the tab drag controller detaches dragged tabs | 117 // Used to determine whether the tab drag controller detaches dragged tabs |
| 118 // into new browser windows while the drag is in process. | 118 // into new browser windows while the drag is in process. |
| 119 static bool ShouldDetachIntoNewBrowser(); | 119 static bool ShouldDetachIntoNewBrowser(); |
| 120 | 120 |
| 121 // Sets the move behavior. Has no effect if started_drag() is true. | 121 // Sets the move behavior. Has no effect if started_drag() is true. |
| 122 void SetMoveBehavior(MoveBehavior behavior); | 122 void SetMoveBehavior(MoveBehavior behavior); |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 // See comment around use for more details. | 636 // See comment around use for more details. |
| 637 int attach_x_; | 637 int attach_x_; |
| 638 int attach_index_; | 638 int attach_index_; |
| 639 | 639 |
| 640 base::WeakPtrFactory<TabDragController> weak_factory_; | 640 base::WeakPtrFactory<TabDragController> weak_factory_; |
| 641 | 641 |
| 642 DISALLOW_COPY_AND_ASSIGN(TabDragController); | 642 DISALLOW_COPY_AND_ASSIGN(TabDragController); |
| 643 }; | 643 }; |
| 644 | 644 |
| 645 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 645 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
| OLD | NEW |