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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // that the tabs should be moved out of the tab strip two possible things | 47 // that the tabs should be moved out of the tab strip two possible things |
48 // can happen (this state is referred to as detached): | 48 // can happen (this state is referred to as detached): |
49 // . If |detach_into_browser_| is true then a new Browser is created and | 49 // . If |detach_into_browser_| is true then a new Browser is created and |
50 // RunMoveLoop() is invoked on the Widget to drag the browser around. This is | 50 // RunMoveLoop() is invoked on the Widget to drag the browser around. This is |
51 // the default on chromeos and can be enabled on windows with a flag. | 51 // the default on chromeos and can be enabled on windows with a flag. |
52 // . If |detach_into_browser_| is false a small representation of the active tab | 52 // . If |detach_into_browser_| is false a small representation of the active tab |
53 // is created and that is dragged around. This mode does not run a nested | 53 // is created and that is dragged around. This mode does not run a nested |
54 // message loop. | 54 // message loop. |
55 class TabDragController : public content::WebContentsDelegate, | 55 class TabDragController : public content::WebContentsDelegate, |
56 public content::NotificationObserver, | 56 public content::NotificationObserver, |
57 public MessageLoopForUI::Observer, | 57 public base::MessageLoopForUI::Observer, |
58 public views::WidgetObserver, | 58 public views::WidgetObserver, |
59 public TabStripModelObserver { | 59 public TabStripModelObserver { |
60 public: | 60 public: |
61 enum DetachBehavior { | 61 enum DetachBehavior { |
62 DETACHABLE, | 62 DETACHABLE, |
63 NOT_DETACHABLE | 63 NOT_DETACHABLE |
64 }; | 64 }; |
65 | 65 |
66 // What should happen as the mouse is dragged within the tabstrip. | 66 // What should happen as the mouse is dragged within the tabstrip. |
67 enum MoveBehavior { | 67 enum MoveBehavior { |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 // If non-null set to true from destructor. | 611 // If non-null set to true from destructor. |
612 bool* destroyed_; | 612 bool* destroyed_; |
613 | 613 |
614 // See description above getter. | 614 // See description above getter. |
615 bool is_mutating_; | 615 bool is_mutating_; |
616 | 616 |
617 DISALLOW_COPY_AND_ASSIGN(TabDragController); | 617 DISALLOW_COPY_AND_ASSIGN(TabDragController); |
618 }; | 618 }; |
619 | 619 |
620 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ | 620 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ |
OLD | NEW |