OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_TABS_TAB_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_GTK_H_ |
6 #define CHROME_BROWSER_GTK_TABS_TAB_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TABS_TAB_GTK_H_ |
7 | 7 |
8 #include "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual bool EndDrag(bool canceled) = 0; | 66 virtual bool EndDrag(bool canceled) = 0; |
67 | 67 |
68 // Returns true if the associated TabStrip's delegate supports tab moving or | 68 // Returns true if the associated TabStrip's delegate supports tab moving or |
69 // detaching. Used by the Frame to determine if dragging on the Tab | 69 // detaching. Used by the Frame to determine if dragging on the Tab |
70 // itself should move the window in cases where there's only one | 70 // itself should move the window in cases where there's only one |
71 // non drag-able Tab. | 71 // non drag-able Tab. |
72 virtual bool HasAvailableDragActions() const = 0; | 72 virtual bool HasAvailableDragActions() const = 0; |
73 | 73 |
74 // Returns the theme provider for icons and colors. | 74 // Returns the theme provider for icons and colors. |
75 virtual ThemeProvider* GetThemeProvider() = 0; | 75 virtual ThemeProvider* GetThemeProvider() = 0; |
76 | |
77 protected: | |
78 ~TabDelegate() {} | |
79 }; | 76 }; |
80 | 77 |
81 explicit TabGtk(TabDelegate* delegate); | 78 explicit TabGtk(TabDelegate* delegate); |
82 virtual ~TabGtk(); | 79 virtual ~TabGtk(); |
83 | 80 |
84 // Access the delegate. | 81 // Access the delegate. |
85 TabDelegate* delegate() const { return delegate_; } | 82 TabDelegate* delegate() const { return delegate_; } |
86 | 83 |
87 GtkWidget* widget() const { return event_box_; } | 84 GtkWidget* widget() const { return event_box_; } |
88 | 85 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 bool dragging_; | 156 bool dragging_; |
160 | 157 |
161 // The cached width of the title in pixels, updated whenever the title | 158 // The cached width of the title in pixels, updated whenever the title |
162 // changes. | 159 // changes. |
163 int title_width_; | 160 int title_width_; |
164 | 161 |
165 DISALLOW_COPY_AND_ASSIGN(TabGtk); | 162 DISALLOW_COPY_AND_ASSIGN(TabGtk); |
166 }; | 163 }; |
167 | 164 |
168 #endif // CHROME_BROWSER_GTK_TABS_TAB_GTK_H_ | 165 #endif // CHROME_BROWSER_GTK_TABS_TAB_GTK_H_ |
OLD | NEW |