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" |
| 15 #include "base/compiler_specific.h" |
14 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
15 #include "base/timer.h" | 17 #include "base/timer.h" |
16 #include "chrome/browser/ui/gtk/tabs/drag_data.h" | 18 #include "chrome/browser/ui/gtk/tabs/drag_data.h" |
17 #include "chrome/browser/ui/tabs/dock_info.h" | 19 #include "chrome/browser/ui/tabs/dock_info.h" |
18 #include "content/browser/tab_contents/tab_contents_delegate.h" | 20 #include "content/browser/tab_contents/tab_contents_delegate.h" |
19 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
21 #include "ui/base/x/x11_util.h" | 23 #include "ui/base/x/x11_util.h" |
22 | 24 |
23 class DraggedViewGtk; | 25 class DraggedViewGtk; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // TODO(adriansc): Remove this method once refactoring changed all call sites. | 89 // TODO(adriansc): Remove this method once refactoring changed all call sites. |
88 virtual TabContents* OpenURLFromTab( | 90 virtual TabContents* OpenURLFromTab( |
89 TabContents* source, | 91 TabContents* source, |
90 const GURL& url, | 92 const GURL& url, |
91 const GURL& referrer, | 93 const GURL& referrer, |
92 WindowOpenDisposition disposition, | 94 WindowOpenDisposition disposition, |
93 content::PageTransition transition) OVERRIDE; | 95 content::PageTransition transition) OVERRIDE; |
94 virtual TabContents* OpenURLFromTab(TabContents* source, | 96 virtual TabContents* OpenURLFromTab(TabContents* source, |
95 const OpenURLParams& params) OVERRIDE; | 97 const OpenURLParams& params) OVERRIDE; |
96 virtual void NavigationStateChanged(const TabContents* source, | 98 virtual void NavigationStateChanged(const TabContents* source, |
97 unsigned changed_flags); | 99 unsigned changed_flags) OVERRIDE; |
98 virtual void AddNewContents(TabContents* source, | 100 virtual void AddNewContents(TabContents* source, |
99 TabContents* new_contents, | 101 TabContents* new_contents, |
100 WindowOpenDisposition disposition, | 102 WindowOpenDisposition disposition, |
101 const gfx::Rect& initial_pos, | 103 const gfx::Rect& initial_pos, |
102 bool user_gesture); | 104 bool user_gesture) OVERRIDE; |
103 virtual void LoadingStateChanged(TabContents* source); | 105 virtual void LoadingStateChanged(TabContents* source) OVERRIDE; |
104 virtual bool IsPopup(const TabContents* source) const; | |
105 virtual content::JavaScriptDialogCreator* | 106 virtual content::JavaScriptDialogCreator* |
106 GetJavaScriptDialogCreator() OVERRIDE; | 107 GetJavaScriptDialogCreator() OVERRIDE; |
107 | 108 |
108 // Overridden from content::NotificationObserver: | 109 // Overridden from content::NotificationObserver: |
109 virtual void Observe(int type, | 110 virtual void Observe(int type, |
110 const content::NotificationSource& source, | 111 const content::NotificationSource& source, |
111 const content::NotificationDetails& details); | 112 const content::NotificationDetails& details); |
112 | 113 |
113 // Returns the point where a detached window should be created given the | 114 // Returns the point where a detached window should be created given the |
114 // current mouse position. | 115 // current mouse position. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 267 |
267 // Timer used to bring the window under the cursor to front. If the user | 268 // Timer used to bring the window under the cursor to front. If the user |
268 // stops moving the mouse for a brief time over a browser window, it is | 269 // stops moving the mouse for a brief time over a browser window, it is |
269 // brought to front. | 270 // brought to front. |
270 base::OneShotTimer<DraggedTabControllerGtk> bring_to_front_timer_; | 271 base::OneShotTimer<DraggedTabControllerGtk> bring_to_front_timer_; |
271 | 272 |
272 DISALLOW_COPY_AND_ASSIGN(DraggedTabControllerGtk); | 273 DISALLOW_COPY_AND_ASSIGN(DraggedTabControllerGtk); |
273 }; | 274 }; |
274 | 275 |
275 #endif // CHROME_BROWSER_UI_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ | 276 #endif // CHROME_BROWSER_UI_GTK_TABS_DRAGGED_TAB_CONTROLLER_GTK_H_ |
OLD | NEW |