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_STRIP_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ |
6 #define CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // Destroys the active drag controller. | 68 // Destroys the active drag controller. |
69 void DestroyDragController(); | 69 void DestroyDragController(); |
70 | 70 |
71 // Removes the drag source tab from this tabstrip, and deletes it. | 71 // Removes the drag source tab from this tabstrip, and deletes it. |
72 void DestroyDraggedSourceTab(TabGtk* tab); | 72 void DestroyDraggedSourceTab(TabGtk* tab); |
73 | 73 |
74 // Retrieve the ideal bounds for the Tab at the specified index. | 74 // Retrieve the ideal bounds for the Tab at the specified index. |
75 gfx::Rect GetIdealBounds(int index); | 75 gfx::Rect GetIdealBounds(int index); |
76 | 76 |
77 // Return the origin of the tab strip in coordinates relative to the GdkWindow | 77 // Return the origin of the tab strip in coordinates relative to where we |
78 // of |widget|. Used to help other widgets draw their background relative to | 78 // start drawing the background theme image. This is the x coordinate of |
79 // the tabstrip. | 79 // the origin of the GdkWindow of widget(), but the y coordinate of the origin |
| 80 // of widget() itself. |
| 81 // Used to help other widgets draw their background relative to the tabstrip. |
| 82 // Should only be called after both the tabstrip and |widget| have been |
| 83 // allocated. |
80 gfx::Point GetTabStripOriginForWidget(GtkWidget* widget); | 84 gfx::Point GetTabStripOriginForWidget(GtkWidget* widget); |
81 | 85 |
82 protected: | 86 protected: |
83 // TabStripModelObserver implementation: | 87 // TabStripModelObserver implementation: |
84 virtual void TabInsertedAt(TabContents* contents, | 88 virtual void TabInsertedAt(TabContents* contents, |
85 int index, | 89 int index, |
86 bool foreground); | 90 bool foreground); |
87 virtual void TabDetachedAt(TabContents* contents, int index); | 91 virtual void TabDetachedAt(TabContents* contents, int index); |
88 virtual void TabSelectedAt(TabContents* old_contents, | 92 virtual void TabSelectedAt(TabContents* old_contents, |
89 TabContents* contents, | 93 TabContents* contents, |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 // ResizeLayoutTabsNow method. | 382 // ResizeLayoutTabsNow method. |
379 ScopedRunnableMethodFactory<TabStripGtk> resize_layout_factory_; | 383 ScopedRunnableMethodFactory<TabStripGtk> resize_layout_factory_; |
380 | 384 |
381 // True if the tabstrip has already been added as a MessageLoop observer. | 385 // True if the tabstrip has already been added as a MessageLoop observer. |
382 bool added_as_message_loop_observer_; | 386 bool added_as_message_loop_observer_; |
383 | 387 |
384 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); | 388 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); |
385 }; | 389 }; |
386 | 390 |
387 #endif // CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ | 391 #endif // CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ |
OLD | NEW |