| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include <set> | 11 #include <set> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/timer.h" | 17 #include "base/timer.h" |
| 18 #include "chrome/browser/ui/gtk/tabs/drag_data.h" | 18 #include "chrome/browser/ui/gtk/tabs/drag_data.h" |
| 19 #include "chrome/browser/ui/tabs/dock_info.h" | 19 #include "chrome/browser/ui/tabs/dock_info.h" |
| 20 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
| 22 #include "content/public/browser/web_contents_delegate.h" | 22 #include "content/public/browser/web_contents_delegate.h" |
| 23 #include "ui/base/x/x11_util.h" | 23 #include "ui/base/x/x11_util.h" |
| 24 | 24 |
| 25 class DraggedViewGtk; | 25 class DraggedViewGtk; |
| 26 class TabGtk; | 26 class TabGtk; |
| 27 class TabStripGtk; | 27 class TabStripGtk; |
| 28 class TabStripModel; | 28 class TabStripModel; |
| 29 class TabContentsWrapper; | 29 class TabContents; |
| 30 typedef TabContents TabContentsWrapper; |
| 30 | 31 |
| 31 class DraggedTabControllerGtk : public content::NotificationObserver, | 32 class DraggedTabControllerGtk : public content::NotificationObserver, |
| 32 public content::WebContentsDelegate { | 33 public content::WebContentsDelegate { |
| 33 public: | 34 public: |
| 34 // |source_tabstrip| is the tabstrip where the tabs reside before any | 35 // |source_tabstrip| is the tabstrip where the tabs reside before any |
| 35 // dragging occurs. |source_tab| is the tab that is under the mouse pointer | 36 // dragging occurs. |source_tab| is the tab that is under the mouse pointer |
| 36 // when dragging starts, it also becomes the active tab if not active | 37 // when dragging starts, it also becomes the active tab if not active |
| 37 // already. |tabs| contains all the selected tabs when dragging starts. | 38 // already. |tabs| contains all the selected tabs when dragging starts. |
| 38 DraggedTabControllerGtk(TabStripGtk* source_tabstrip, TabGtk* source_tab, | 39 DraggedTabControllerGtk(TabStripGtk* source_tabstrip, TabGtk* source_tab, |
| 39 const std::vector<TabGtk*>& tabs); | 40 const std::vector<TabGtk*>& tabs); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 261 |
| 261 // Timer used to bring the window under the cursor to front. If the user | 262 // Timer used to bring the window under the cursor to front. If the user |
| 262 // stops moving the mouse for a brief time over a browser window, it is | 263 // stops moving the mouse for a brief time over a browser window, it is |
| 263 // brought to front. | 264 // brought to front. |
| 264 base::OneShotTimer<DraggedTabControllerGtk> bring_to_front_timer_; | 265 base::OneShotTimer<DraggedTabControllerGtk> bring_to_front_timer_; |
| 265 | 266 |
| 266 DISALLOW_COPY_AND_ASSIGN(DraggedTabControllerGtk); | 267 DISALLOW_COPY_AND_ASSIGN(DraggedTabControllerGtk); |
| 267 }; | 268 }; |
| 268 | 269 |
| 269 #endif // CHROME_BROWSER_UI_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ | 270 #endif // CHROME_BROWSER_UI_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ |
| OLD | NEW |