OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ |
6 #define CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ |
7 | 7 |
8 #include "base/gfx/rect.h" | 8 #include "base/gfx/rect.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 bool EndDrag(bool canceled); | 61 bool EndDrag(bool canceled); |
62 | 62 |
63 // Retrieve the source Tab if the TabContents specified matches the one being | 63 // Retrieve the source Tab if the TabContents specified matches the one being |
64 // dragged by this controller, or NULL if the specified TabContents is not | 64 // dragged by this controller, or NULL if the specified TabContents is not |
65 // the same as the one being dragged. | 65 // the same as the one being dragged. |
66 Tab* GetDragSourceTabForContents(TabContents* contents) const; | 66 Tab* GetDragSourceTabForContents(TabContents* contents) const; |
67 | 67 |
68 // Returns true if the specified Tab matches the Tab being dragged. | 68 // Returns true if the specified Tab matches the Tab being dragged. |
69 bool IsDragSourceTab(Tab* tab) const; | 69 bool IsDragSourceTab(Tab* tab) const; |
70 | 70 |
| 71 |
| 72 |
| 73 TabContents* dragged_contents() { return dragged_contents_; } |
| 74 |
| 75 |
| 76 |
71 private: | 77 private: |
72 class DockDisplayer; | 78 class DockDisplayer; |
73 friend class DockDisplayer; | 79 friend class DockDisplayer; |
74 | 80 |
75 // Enumeration of the ways a drag session can end. | 81 // Enumeration of the ways a drag session can end. |
76 enum EndDragType { | 82 enum EndDragType { |
77 // Drag session exited normally: the user released the mouse. | 83 // Drag session exited normally: the user released the mouse. |
78 NORMAL, | 84 NORMAL, |
79 | 85 |
80 // The drag session was canceled (alt-tab during drag, escape ...) | 86 // The drag session was canceled (alt-tab during drag, escape ...) |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 309 |
304 // Timer used to bring the window under the cursor to front. If the user | 310 // Timer used to bring the window under the cursor to front. If the user |
305 // stops moving the mouse for a brief time over a browser window, it is | 311 // stops moving the mouse for a brief time over a browser window, it is |
306 // brought to front. | 312 // brought to front. |
307 base::OneShotTimer<DraggedTabController> bring_to_front_timer_; | 313 base::OneShotTimer<DraggedTabController> bring_to_front_timer_; |
308 | 314 |
309 DISALLOW_COPY_AND_ASSIGN(DraggedTabController); | 315 DISALLOW_COPY_AND_ASSIGN(DraggedTabController); |
310 }; | 316 }; |
311 | 317 |
312 #endif // CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ | 318 #endif // CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ |
OLD | NEW |