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_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 BaseTab* tab) const; | 41 BaseTab* tab) const; |
42 void ExecuteCommandForTab(TabStripModel::ContextMenuCommand command_id, | 42 void ExecuteCommandForTab(TabStripModel::ContextMenuCommand command_id, |
43 BaseTab* tab); | 43 BaseTab* tab); |
44 bool IsTabPinned(BaseTab* tab) const; | 44 bool IsTabPinned(BaseTab* tab) const; |
45 | 45 |
46 // TabStripController implementation: | 46 // TabStripController implementation: |
47 virtual const TabStripSelectionModel& GetSelectionModel() OVERRIDE; | 47 virtual const TabStripSelectionModel& GetSelectionModel() OVERRIDE; |
48 virtual int GetCount() const OVERRIDE; | 48 virtual int GetCount() const OVERRIDE; |
49 virtual bool IsValidIndex(int model_index) const OVERRIDE; | 49 virtual bool IsValidIndex(int model_index) const OVERRIDE; |
50 virtual bool IsActiveTab(int model_index) const OVERRIDE; | 50 virtual bool IsActiveTab(int model_index) const OVERRIDE; |
| 51 virtual int GetActiveIndex() const OVERRIDE; |
51 virtual bool IsTabSelected(int model_index) const OVERRIDE; | 52 virtual bool IsTabSelected(int model_index) const OVERRIDE; |
52 virtual bool IsTabPinned(int model_index) const OVERRIDE; | 53 virtual bool IsTabPinned(int model_index) const OVERRIDE; |
53 virtual bool IsTabCloseable(int model_index) const OVERRIDE; | 54 virtual bool IsTabCloseable(int model_index) const OVERRIDE; |
54 virtual bool IsNewTabPage(int model_index) const OVERRIDE; | 55 virtual bool IsNewTabPage(int model_index) const OVERRIDE; |
55 virtual void SelectTab(int model_index) OVERRIDE; | 56 virtual void SelectTab(int model_index) OVERRIDE; |
56 virtual void ExtendSelectionTo(int model_index) OVERRIDE; | 57 virtual void ExtendSelectionTo(int model_index) OVERRIDE; |
57 virtual void ToggleSelected(int model_index) OVERRIDE; | 58 virtual void ToggleSelected(int model_index) OVERRIDE; |
58 virtual void AddSelectionFromAnchorTo(int model_index) OVERRIDE; | 59 virtual void AddSelectionFromAnchorTo(int model_index) OVERRIDE; |
59 virtual void CloseTab(int model_index) OVERRIDE; | 60 virtual void CloseTab(int model_index) OVERRIDE; |
60 virtual void ShowContextMenuForTab(BaseTab* tab, | 61 virtual void ShowContextMenuForTab(BaseTab* tab, |
61 const gfx::Point& p) OVERRIDE; | 62 const gfx::Point& p) OVERRIDE; |
62 virtual void UpdateLoadingAnimations() OVERRIDE; | 63 virtual void UpdateLoadingAnimations() OVERRIDE; |
63 virtual int HasAvailableDragActions() const OVERRIDE; | 64 virtual int HasAvailableDragActions() const OVERRIDE; |
64 virtual void OnDropIndexUpdate(int index, bool drop_before) OVERRIDE; | 65 virtual void OnDropIndexUpdate(int index, bool drop_before) OVERRIDE; |
65 virtual void PerformDrop(bool drop_before, | 66 virtual void PerformDrop(bool drop_before, |
66 int index, | 67 int index, |
67 const GURL& url) OVERRIDE; | 68 const GURL& url) OVERRIDE; |
68 virtual bool IsCompatibleWith(TabStrip* other) const OVERRIDE; | 69 virtual bool IsCompatibleWith(TabStrip* other) const OVERRIDE; |
69 virtual void CreateNewTab() OVERRIDE; | 70 virtual void CreateNewTab() OVERRIDE; |
70 virtual void ClickActiveTab(int index) OVERRIDE; | 71 virtual void ClickActiveTab(int index) OVERRIDE; |
71 virtual bool IsIncognito() OVERRIDE; | 72 virtual bool IsIncognito() OVERRIDE; |
72 | 73 |
73 // TabStripModelObserver implementation: | 74 // TabStripModelObserver implementation: |
74 virtual void TabInsertedAt(TabContentsWrapper* contents, | 75 virtual void TabInsertedAt(TabContentsWrapper* contents, |
75 int model_index, | 76 int model_index, |
76 bool active) OVERRIDE; | 77 bool is_active) OVERRIDE; |
77 virtual void TabDetachedAt(TabContentsWrapper* contents, | 78 virtual void TabDetachedAt(TabContentsWrapper* contents, |
78 int model_index) OVERRIDE; | 79 int model_index) OVERRIDE; |
79 virtual void TabSelectionChanged( | 80 virtual void TabSelectionChanged( |
80 TabStripModel* tab_strip_model, | 81 TabStripModel* tab_strip_model, |
81 const TabStripSelectionModel& old_model) OVERRIDE; | 82 const TabStripSelectionModel& old_model) OVERRIDE; |
82 virtual void TabMoved(TabContentsWrapper* contents, | 83 virtual void TabMoved(TabContentsWrapper* contents, |
83 int from_model_index, | 84 int from_model_index, |
84 int to_model_index) OVERRIDE; | 85 int to_model_index) OVERRIDE; |
85 virtual void TabChangedAt(TabContentsWrapper* contents, | 86 virtual void TabChangedAt(TabContentsWrapper* contents, |
86 int model_index, | 87 int model_index, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 146 |
146 content::NotificationRegistrar notification_registrar_; | 147 content::NotificationRegistrar notification_registrar_; |
147 | 148 |
148 // Helper for performing tab selection as a result of dragging over a tab. | 149 // Helper for performing tab selection as a result of dragging over a tab. |
149 HoverTabSelector hover_tab_selector_; | 150 HoverTabSelector hover_tab_selector_; |
150 | 151 |
151 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController); | 152 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController); |
152 }; | 153 }; |
153 | 154 |
154 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ | 155 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |