| 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" |
| 11 #include "chrome/browser/dock_info.h" | 11 #include "chrome/browser/dock_info.h" |
| 12 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 12 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
| 13 #include "chrome/browser/tabs/tab_strip_model.h" | 13 #include "chrome/browser/tabs/tab_strip_model.h" |
| 14 #include "chrome/browser/views/tabs/tab_renderer.h" | 14 #include "chrome/browser/views/tabs/tab_renderer.h" |
| 15 #include "chrome/common/notification_registrar.h" | 15 #include "chrome/common/notification_registrar.h" |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 class MouseEvent; | 18 class MouseEvent; |
| 19 class View; | 19 class View; |
| 20 } | 20 } |
| 21 class BrowserWindow; | 21 class BrowserWindow; |
| 22 class DraggedTabView; | 22 class DraggedTabView; |
| 23 class HWNDPhotobooth; | 23 class NativeViewPhotobooth; |
| 24 class SkBitmap; | 24 class SkBitmap; |
| 25 class Tab; | 25 class Tab; |
| 26 class TabStrip; | 26 class TabStrip; |
| 27 class TabStripModel; | 27 class TabStripModel; |
| 28 | 28 |
| 29 /////////////////////////////////////////////////////////////////////////////// | 29 /////////////////////////////////////////////////////////////////////////////// |
| 30 // | 30 // |
| 31 // DraggedTabController | 31 // DraggedTabController |
| 32 // | 32 // |
| 33 // An object that handles a drag session for an individual Tab within a | 33 // An object that handles a drag session for an individual Tab within a |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 // The TabStrip the dragged Tab is currently attached to, or NULL if the | 252 // The TabStrip the dragged Tab is currently attached to, or NULL if the |
| 253 // dragged Tab is detached. | 253 // dragged Tab is detached. |
| 254 TabStrip* attached_tabstrip_; | 254 TabStrip* attached_tabstrip_; |
| 255 | 255 |
| 256 // The visual representation of the dragged Tab. | 256 // The visual representation of the dragged Tab. |
| 257 scoped_ptr<DraggedTabView> view_; | 257 scoped_ptr<DraggedTabView> view_; |
| 258 | 258 |
| 259 // The photo-booth the TabContents sits in when the Tab is detached, to | 259 // The photo-booth the TabContents sits in when the Tab is detached, to |
| 260 // obtain screen shots. | 260 // obtain screen shots. |
| 261 scoped_ptr<HWNDPhotobooth> photobooth_; | 261 scoped_ptr<NativeViewPhotobooth> photobooth_; |
| 262 | 262 |
| 263 // The position of the mouse (in screen coordinates) at the start of the drag | 263 // The position of the mouse (in screen coordinates) at the start of the drag |
| 264 // operation. This is used to calculate minimum elasticity before a | 264 // operation. This is used to calculate minimum elasticity before a |
| 265 // DraggedTabView is constructed. | 265 // DraggedTabView is constructed. |
| 266 gfx::Point start_screen_point_; | 266 gfx::Point start_screen_point_; |
| 267 | 267 |
| 268 // This is the offset of the mouse from the top left of the Tab where | 268 // This is the offset of the mouse from the top left of the Tab where |
| 269 // dragging begun. This is used to ensure that the dragged view is always | 269 // dragging begun. This is used to ensure that the dragged view is always |
| 270 // positioned at the correct location during the drag, and to ensure that the | 270 // positioned at the correct location during the drag, and to ensure that the |
| 271 // detached window is created at the right location. | 271 // detached window is created at the right location. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 // Timer used to bring the window under the cursor to front. If the user | 304 // 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 | 305 // stops moving the mouse for a brief time over a browser window, it is |
| 306 // brought to front. | 306 // brought to front. |
| 307 base::OneShotTimer<DraggedTabController> bring_to_front_timer_; | 307 base::OneShotTimer<DraggedTabController> bring_to_front_timer_; |
| 308 | 308 |
| 309 DISALLOW_COPY_AND_ASSIGN(DraggedTabController); | 309 DISALLOW_COPY_AND_ASSIGN(DraggedTabController); |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 #endif // CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ | 312 #endif // CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_CONTROLLER_H_ |
| OLD | NEW |