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_TAB_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // destroyed. | 80 // destroyed. |
81 virtual bool EndDrag(bool canceled) = 0; | 81 virtual bool EndDrag(bool canceled) = 0; |
82 | 82 |
83 // Returns true if the associated TabStrip's delegate supports tab moving or | 83 // Returns true if the associated TabStrip's delegate supports tab moving or |
84 // detaching. Used by the Frame to determine if dragging on the Tab | 84 // detaching. Used by the Frame to determine if dragging on the Tab |
85 // itself should move the window in cases where there's only one | 85 // itself should move the window in cases where there's only one |
86 // non drag-able Tab. | 86 // non drag-able Tab. |
87 virtual bool HasAvailableDragActions() const = 0; | 87 virtual bool HasAvailableDragActions() const = 0; |
88 | 88 |
89 // Returns the theme provider for icons and colors. | 89 // Returns the theme provider for icons and colors. |
90 virtual ThemeService* GetThemeProvider() = 0; | 90 virtual GtkThemeService* GetThemeProvider() = 0; |
91 | 91 |
92 // Returns a context menu controller for |tab|. Caller takes ownership of | 92 // Returns a context menu controller for |tab|. Caller takes ownership of |
93 // the pointed object. | 93 // the pointed object. |
94 virtual TabStripMenuController* GetTabStripMenuControllerForTab( | 94 virtual TabStripMenuController* GetTabStripMenuControllerForTab( |
95 TabGtk* tab) = 0; | 95 TabGtk* tab) = 0; |
96 | 96 |
97 protected: | 97 protected: |
98 virtual ~TabDelegate() {} | 98 virtual ~TabDelegate() {} |
99 }; | 99 }; |
100 | 100 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // mouse release event on the the dragged widget, otherwise, we don't know | 219 // mouse release event on the the dragged widget, otherwise, we don't know |
220 // when the drag has ended when the user presses space or enter. We queue | 220 // when the drag has ended when the user presses space or enter. We queue |
221 // a task to end the drag and only run it if GTK+ didn't send us the | 221 // a task to end the drag and only run it if GTK+ didn't send us the |
222 // drag-failed event. | 222 // drag-failed event. |
223 base::WeakPtrFactory<TabGtk> drag_end_factory_; | 223 base::WeakPtrFactory<TabGtk> drag_end_factory_; |
224 | 224 |
225 DISALLOW_COPY_AND_ASSIGN(TabGtk); | 225 DISALLOW_COPY_AND_ASSIGN(TabGtk); |
226 }; | 226 }; |
227 | 227 |
228 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ | 228 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_GTK_H_ |
OLD | NEW |