| 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_STRIP_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/task.h" | 14 #include "base/task.h" |
| 15 #include "chrome/browser/tabs/tab_strip_model.h" | 15 #include "chrome/browser/tabs/tab_strip_model.h" |
| 16 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | |
| 17 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h" | 16 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h" |
| 18 #include "chrome/browser/ui/gtk/tabstrip_origin_provider.h" | 17 #include "chrome/browser/ui/gtk/tabstrip_origin_provider.h" |
| 19 #include "chrome/browser/ui/gtk/view_id_util.h" | 18 #include "chrome/browser/ui/gtk/view_id_util.h" |
| 20 #include "chrome/browser/ui/tabs/hover_tab_selector.h" | 19 #include "chrome/browser/ui/tabs/hover_tab_selector.h" |
| 21 #include "content/common/notification_observer.h" | 20 #include "content/common/notification_observer.h" |
| 22 #include "ui/base/gtk/gtk_signal.h" | 21 #include "ui/base/gtk/gtk_signal.h" |
| 22 #include "ui/base/gtk/owned_widget_gtk.h" |
| 23 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
| 24 | 24 |
| 25 class BrowserWindowGtk; | 25 class BrowserWindowGtk; |
| 26 class CustomDrawButton; | 26 class CustomDrawButton; |
| 27 class DraggedTabControllerGtk; | 27 class DraggedTabControllerGtk; |
| 28 class GtkThemeService; | 28 class GtkThemeService; |
| 29 | 29 |
| 30 class TabStripGtk : public TabStripModelObserver, | 30 class TabStripGtk : public TabStripModelObserver, |
| 31 public TabGtk::TabDelegate, | 31 public TabGtk::TabDelegate, |
| 32 public MessageLoopForUI::Observer, | 32 public MessageLoopForUI::Observer, |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // are closing the last tab and need to resize immediately, we'll resize only | 417 // are closing the last tab and need to resize immediately, we'll resize only |
| 418 // back to this width, thus once again placing the last tab under the mouse | 418 // back to this width, thus once again placing the last tab under the mouse |
| 419 // cursor. | 419 // cursor. |
| 420 int available_width_for_tabs_; | 420 int available_width_for_tabs_; |
| 421 | 421 |
| 422 // True if a resize layout animation should be run a short delay after the | 422 // True if a resize layout animation should be run a short delay after the |
| 423 // mouse exits the TabStrip. | 423 // mouse exits the TabStrip. |
| 424 bool needs_resize_layout_; | 424 bool needs_resize_layout_; |
| 425 | 425 |
| 426 // The GtkFixed widget. | 426 // The GtkFixed widget. |
| 427 OwnedWidgetGtk tabstrip_; | 427 ui::OwnedWidgetGtk tabstrip_; |
| 428 | 428 |
| 429 // The bounds of the tabstrip. | 429 // The bounds of the tabstrip. |
| 430 gfx::Rect bounds_; | 430 gfx::Rect bounds_; |
| 431 | 431 |
| 432 // The amount to offset tab backgrounds when we are using an autogenerated | 432 // The amount to offset tab backgrounds when we are using an autogenerated |
| 433 // tab background image. | 433 // tab background image. |
| 434 int tab_vertical_offset_; | 434 int tab_vertical_offset_; |
| 435 | 435 |
| 436 // Our model. | 436 // Our model. |
| 437 TabStripModel* model_; | 437 TabStripModel* model_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 465 // True if the tabstrip has already been added as a MessageLoop observer. | 465 // True if the tabstrip has already been added as a MessageLoop observer. |
| 466 bool added_as_message_loop_observer_; | 466 bool added_as_message_loop_observer_; |
| 467 | 467 |
| 468 // Helper for performing tab selection as a result of dragging over a tab. | 468 // Helper for performing tab selection as a result of dragging over a tab. |
| 469 HoverTabSelector hover_tab_selector_; | 469 HoverTabSelector hover_tab_selector_; |
| 470 | 470 |
| 471 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); | 471 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); |
| 472 }; | 472 }; |
| 473 | 473 |
| 474 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ | 474 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ |
| OLD | NEW |