| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 gint x, gint y, GtkSelectionData* data, | 244 gint x, gint y, GtkSelectionData* data, |
| 245 guint info, guint time, | 245 guint info, guint time, |
| 246 TabStripGtk* tabstrip); | 246 TabStripGtk* tabstrip); |
| 247 | 247 |
| 248 // Handles the clicked signal from the new tab button. | 248 // Handles the clicked signal from the new tab button. |
| 249 static void OnNewTabClicked(GtkWidget* widget, TabStripGtk* tabstrip); | 249 static void OnNewTabClicked(GtkWidget* widget, TabStripGtk* tabstrip); |
| 250 | 250 |
| 251 // Sets the bounds of the tab and moves the tab widget to those bounds. | 251 // Sets the bounds of the tab and moves the tab widget to those bounds. |
| 252 void SetTabBounds(TabGtk* tab, const gfx::Rect& bounds); | 252 void SetTabBounds(TabGtk* tab, const gfx::Rect& bounds); |
| 253 | 253 |
| 254 // Returns true if |rects| are all areas that match up with tab favicons. |
| 255 // |rects| must be sorted from left to right. |tabs_to_paint| are the tab |
| 256 // positions that match the rects. |
| 257 bool CanPaintOnlyFavIcons(const GdkRectangle* rects, |
| 258 int num_rects, |
| 259 std::vector<int>* tabs_to_paint); |
| 260 |
| 261 // Paints the tab favicon areas for tabs in |tabs_to_paint|. |
| 262 void PaintOnlyFavIcons(GdkEventExpose* event, |
| 263 const std::vector<int>& tabs_to_paint); |
| 264 |
| 254 // Initializes the new tab button. | 265 // Initializes the new tab button. |
| 255 CustomDrawButton* MakeNewTabButton(); | 266 CustomDrawButton* MakeNewTabButton(); |
| 256 | 267 |
| 257 // Gets the number of Tabs in the collection. | 268 // Gets the number of Tabs in the collection. |
| 258 int GetTabCount() const; | 269 int GetTabCount() const; |
| 259 | 270 |
| 260 // Returns the number of pinned tabs. | 271 // Returns the number of pinned tabs. |
| 261 int GetPinnedTabCount() const; | 272 int GetPinnedTabCount() const; |
| 262 | 273 |
| 263 // Retrieves the Tab at the specified index. | 274 // Retrieves the Tab at the specified index. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 // ResizeLayoutTabsNow method. | 436 // ResizeLayoutTabsNow method. |
| 426 ScopedRunnableMethodFactory<TabStripGtk> resize_layout_factory_; | 437 ScopedRunnableMethodFactory<TabStripGtk> resize_layout_factory_; |
| 427 | 438 |
| 428 // True if the tabstrip has already been added as a MessageLoop observer. | 439 // True if the tabstrip has already been added as a MessageLoop observer. |
| 429 bool added_as_message_loop_observer_; | 440 bool added_as_message_loop_observer_; |
| 430 | 441 |
| 431 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); | 442 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); |
| 432 }; | 443 }; |
| 433 | 444 |
| 434 #endif // CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ | 445 #endif // CHROME_BROWSER_GTK_TABS_TAB_STRIP_GTK_H_ |
| OLD | NEW |