| 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> |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // ViewIDUtil::Delegate implementation --------------------------------------- | 101 // ViewIDUtil::Delegate implementation --------------------------------------- |
| 102 virtual GtkWidget* GetWidgetForViewID(ViewID id); | 102 virtual GtkWidget* GetWidgetForViewID(ViewID id); |
| 103 | 103 |
| 104 protected: | 104 protected: |
| 105 // TabStripModelObserver implementation: | 105 // TabStripModelObserver implementation: |
| 106 virtual void TabInsertedAt(TabContentsWrapper* contents, | 106 virtual void TabInsertedAt(TabContentsWrapper* contents, |
| 107 int index, | 107 int index, |
| 108 bool foreground); | 108 bool foreground); |
| 109 virtual void TabDetachedAt(TabContentsWrapper* contents, int index); | 109 virtual void TabDetachedAt(TabContentsWrapper* contents, int index); |
| 110 virtual void ActiveTabChanged(TabContentsWrapper* old_contents, | |
| 111 TabContentsWrapper* contents, | |
| 112 int index, | |
| 113 bool user_gesture); | |
| 114 virtual void TabMoved(TabContentsWrapper* contents, | 110 virtual void TabMoved(TabContentsWrapper* contents, |
| 115 int from_index, | 111 int from_index, |
| 116 int to_index); | 112 int to_index); |
| 113 virtual void TabSelectionChanged(const TabStripSelectionModel& old_model); |
| 117 virtual void TabChangedAt(TabContentsWrapper* contents, int index, | 114 virtual void TabChangedAt(TabContentsWrapper* contents, int index, |
| 118 TabChangeType change_type); | 115 TabChangeType change_type); |
| 119 virtual void TabReplacedAt(TabStripModel* tab_strip_model, | 116 virtual void TabReplacedAt(TabStripModel* tab_strip_model, |
| 120 TabContentsWrapper* old_contents, | 117 TabContentsWrapper* old_contents, |
| 121 TabContentsWrapper* new_contents, | 118 TabContentsWrapper* new_contents, |
| 122 int index); | 119 int index); |
| 123 virtual void TabMiniStateChanged(TabContentsWrapper* contents, int index); | 120 virtual void TabMiniStateChanged(TabContentsWrapper* contents, int index); |
| 124 virtual void TabBlockedStateChanged(TabContentsWrapper* contents, | 121 virtual void TabBlockedStateChanged(TabContentsWrapper* contents, |
| 125 int index); | 122 int index); |
| 126 | 123 |
| 127 // TabGtk::TabDelegate implementation: | 124 // TabGtk::TabDelegate implementation: |
| 125 virtual bool IsTabActive(const TabGtk* tab) const; |
| 128 virtual bool IsTabSelected(const TabGtk* tab) const; | 126 virtual bool IsTabSelected(const TabGtk* tab) const; |
| 129 virtual bool IsTabPinned(const TabGtk* tab) const; | 127 virtual bool IsTabPinned(const TabGtk* tab) const; |
| 130 virtual bool IsTabDetached(const TabGtk* tab) const; | 128 virtual bool IsTabDetached(const TabGtk* tab) const; |
| 131 virtual void SelectTab(TabGtk* tab); | 129 virtual void ActivateTab(TabGtk* tab); |
| 130 virtual void ToggleTabSelection(TabGtk* tab); |
| 131 virtual void ExtendTabSelection(TabGtk* tab); |
| 132 virtual void CloseTab(TabGtk* tab); | 132 virtual void CloseTab(TabGtk* tab); |
| 133 virtual bool IsCommandEnabledForTab( | 133 virtual bool IsCommandEnabledForTab( |
| 134 TabStripModel::ContextMenuCommand command_id, const TabGtk* tab) const; | 134 TabStripModel::ContextMenuCommand command_id, const TabGtk* tab) const; |
| 135 virtual void ExecuteCommandForTab( | 135 virtual void ExecuteCommandForTab( |
| 136 TabStripModel::ContextMenuCommand command_id, TabGtk* tab); | 136 TabStripModel::ContextMenuCommand command_id, TabGtk* tab); |
| 137 virtual void StartHighlightTabsForCommand( | 137 virtual void StartHighlightTabsForCommand( |
| 138 TabStripModel::ContextMenuCommand command_id, TabGtk* tab); | 138 TabStripModel::ContextMenuCommand command_id, TabGtk* tab); |
| 139 virtual void StopHighlightTabsForCommand( | 139 virtual void StopHighlightTabsForCommand( |
| 140 TabStripModel::ContextMenuCommand command_id, TabGtk* tab); | 140 TabStripModel::ContextMenuCommand command_id, TabGtk* tab); |
| 141 virtual void StopAllHighlighting(); | 141 virtual void StopAllHighlighting(); |
| 142 virtual void MaybeStartDrag(TabGtk* tab, const gfx::Point& point); | 142 virtual void MaybeStartDrag(TabGtk* tab, const gfx::Point& point); |
| 143 virtual void ContinueDrag(GdkDragContext* context); | 143 virtual void ContinueDrag(GdkDragContext* context); |
| 144 virtual bool EndDrag(bool canceled); | 144 virtual bool EndDrag(bool canceled); |
| 145 virtual bool HasAvailableDragActions() const; | 145 virtual bool HasAvailableDragActions() const; |
| 146 virtual ui::ThemeProvider* GetThemeProvider(); | 146 virtual ui::ThemeProvider* GetThemeProvider(); |
| 147 virtual TabStripMenuController* GetTabStripMenuControllerForTab(TabGtk* tab); |
| 147 | 148 |
| 148 // MessageLoop::Observer implementation: | 149 // MessageLoop::Observer implementation: |
| 149 virtual void WillProcessEvent(GdkEvent* event); | 150 virtual void WillProcessEvent(GdkEvent* event); |
| 150 virtual void DidProcessEvent(GdkEvent* event); | 151 virtual void DidProcessEvent(GdkEvent* event); |
| 151 | 152 |
| 152 // Overridden from NotificationObserver: | 153 // Overridden from NotificationObserver: |
| 153 virtual void Observe(NotificationType type, | 154 virtual void Observe(NotificationType type, |
| 154 const NotificationSource& source, | 155 const NotificationSource& source, |
| 155 const NotificationDetails& details); | 156 const NotificationDetails& details); |
| 156 | 157 |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 // True if the tabstrip has already been added as a MessageLoop observer. | 462 // True if the tabstrip has already been added as a MessageLoop observer. |
| 462 bool added_as_message_loop_observer_; | 463 bool added_as_message_loop_observer_; |
| 463 | 464 |
| 464 // Helper for performing tab selection as a result of dragging over a tab. | 465 // Helper for performing tab selection as a result of dragging over a tab. |
| 465 HoverTabSelector hover_tab_selector_; | 466 HoverTabSelector hover_tab_selector_; |
| 466 | 467 |
| 467 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); | 468 DISALLOW_COPY_AND_ASSIGN(TabStripGtk); |
| 468 }; | 469 }; |
| 469 | 470 |
| 470 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ | 471 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_STRIP_GTK_H_ |
| OLD | NEW |