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 <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.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 "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
21 #include "ui/base/models/list_selection_model.h" | 21 #include "ui/base/models/list_selection_model.h" |
22 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
23 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 | 598 |
599 // |attach_x_| and |attach_index_| are set to the x-coordinate of the mouse | 599 // |attach_x_| and |attach_index_| are set to the x-coordinate of the mouse |
600 // (in terms of the tabstrip) and the insertion index at the time tabs are | 600 // (in terms of the tabstrip) and the insertion index at the time tabs are |
601 // dragged into a new browser (attached). They are used to ensure we don't | 601 // dragged into a new browser (attached). They are used to ensure we don't |
602 // shift the tabs around in the wrong direction. The two are only valid if | 602 // shift the tabs around in the wrong direction. The two are only valid if |
603 // |attach_index_| is not -1. | 603 // |attach_index_| is not -1. |
604 // See comment around use for more details. | 604 // See comment around use for more details. |
605 int attach_x_; | 605 int attach_x_; |
606 int attach_index_; | 606 int attach_index_; |
607 | 607 |
608 scoped_ptr<ui::EventHandler> escape_tracker_; | 608 std::unique_ptr<ui::EventHandler> escape_tracker_; |
609 | 609 |
610 scoped_ptr<WindowFinder> window_finder_; | 610 std::unique_ptr<WindowFinder> window_finder_; |
611 | 611 |
612 base::WeakPtrFactory<TabDragController> weak_factory_; | 612 base::WeakPtrFactory<TabDragController> weak_factory_; |
613 | 613 |
614 DISALLOW_COPY_AND_ASSIGN(TabDragController); | 614 DISALLOW_COPY_AND_ASSIGN(TabDragController); |
615 }; | 615 }; |
616 | 616 |
617 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 617 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
OLD | NEW |