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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
18 #include "chrome/browser/ui/views/tabs/tab_strip_types.h" | 18 #include "chrome/browser/ui/views/tabs/tab_strip_types.h" |
19 #include "ui/base/models/list_selection_model.h" | 19 #include "ui/base/models/list_selection_model.h" |
20 #include "ui/gfx/geometry/rect.h" | 20 #include "ui/gfx/geometry/rect.h" |
21 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
22 #include "ui/views/widget/widget_observer.h" | 22 #include "ui/views/widget/widget_observer.h" |
23 | 23 |
24 namespace gfx { | |
25 class Screen; | |
26 } | |
27 namespace ui { | 24 namespace ui { |
28 class EventHandler; | 25 class EventHandler; |
29 class ListSelectionModel; | 26 class ListSelectionModel; |
30 } | 27 } |
31 namespace views { | 28 namespace views { |
32 class View; | 29 class View; |
33 } | 30 } |
34 class Browser; | 31 class Browser; |
35 class Tab; | 32 class Tab; |
36 class TabDragControllerTest; | 33 class TabDragControllerTest; |
37 struct TabRendererData; | |
38 class TabStrip; | 34 class TabStrip; |
39 class TabStripModel; | 35 class TabStripModel; |
40 class WindowFinder; | 36 class WindowFinder; |
41 | 37 |
42 // TabDragController is responsible for managing the tab dragging session. When | 38 // TabDragController is responsible for managing the tab dragging session. When |
43 // the user presses the mouse on a tab a new TabDragController is created and | 39 // the user presses the mouse on a tab a new TabDragController is created and |
44 // Drag() is invoked as the mouse is dragged. If the mouse is dragged far enough | 40 // Drag() is invoked as the mouse is dragged. If the mouse is dragged far enough |
45 // TabDragController starts a drag session. The drag session is completed when | 41 // TabDragController starts a drag session. The drag session is completed when |
46 // EndDrag() is invoked (or the TabDragController is destroyed). | 42 // EndDrag() is invoked (or the TabDragController is destroyed). |
47 // | 43 // |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 std::unique_ptr<ui::EventHandler> escape_tracker_; | 600 std::unique_ptr<ui::EventHandler> escape_tracker_; |
605 | 601 |
606 std::unique_ptr<WindowFinder> window_finder_; | 602 std::unique_ptr<WindowFinder> window_finder_; |
607 | 603 |
608 base::WeakPtrFactory<TabDragController> weak_factory_; | 604 base::WeakPtrFactory<TabDragController> weak_factory_; |
609 | 605 |
610 DISALLOW_COPY_AND_ASSIGN(TabDragController); | 606 DISALLOW_COPY_AND_ASSIGN(TabDragController); |
611 }; | 607 }; |
612 | 608 |
613 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 609 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
OLD | NEW |