| 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_TABS_TAB_STRIP_MODEL_H_ | 5 #ifndef CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
| 6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // selected tabs are moved to is (index + selected-mini-tab-count). For | 234 // selected tabs are moved to is (index + selected-mini-tab-count). For |
| 235 // example, if the model consists of [A b c D E f] (A b c are mini) and this | 235 // example, if the model consists of [A b c D E f] (A b c are mini) and this |
| 236 // is inokved with 2, the result is [b c A D E f]. In this example nothing | 236 // is inokved with 2, the result is [b c A D E f]. In this example nothing |
| 237 // special happened because the target index was <= (mini-tab-count - | 237 // special happened because the target index was <= (mini-tab-count - |
| 238 // selected-mini-tab-count). If the target index were 3, then the result would | 238 // selected-mini-tab-count). If the target index were 3, then the result would |
| 239 // be [b c A f D F]. A, being mini, can move no further than index 2. The | 239 // be [b c A f D F]. A, being mini, can move no further than index 2. The |
| 240 // non-mini-tabs are moved to the target index + selected-mini-tab-count (3 + | 240 // non-mini-tabs are moved to the target index + selected-mini-tab-count (3 + |
| 241 // 1) | 241 // 1) |
| 242 void MoveSelectedTabsTo(int index); | 242 void MoveSelectedTabsTo(int index); |
| 243 | 243 |
| 244 // Returns the currently selected TabContents, or NULL if there is none. | 244 // Returns the currently active TabContents, or NULL if there is none. |
| 245 // TODO(sky): rename to GetActiveTabContents. | 245 TabContentsWrapper* GetActiveTabContents() const; |
| 246 TabContentsWrapper* GetSelectedTabContents() const; | |
| 247 | 246 |
| 248 // Returns the TabContentsWrapper at the specified index, or NULL if there is | 247 // Returns the TabContentsWrapper at the specified index, or NULL if there is |
| 249 // none. | 248 // none. |
| 250 TabContentsWrapper* GetTabContentsAt(int index) const; | 249 TabContentsWrapper* GetTabContentsAt(int index) const; |
| 251 | 250 |
| 252 // Returns the index of the specified TabContents wrapper, or | 251 // Returns the index of the specified TabContents wrapper, or |
| 253 // TabStripModel::kNoTab if the TabContents is not in this TabStripModel. | 252 // TabStripModel::kNoTab if the TabContents is not in this TabStripModel. |
| 254 int GetIndexOfTabContents(const TabContentsWrapper* contents) const; | 253 int GetIndexOfTabContents(const TabContentsWrapper* contents) const; |
| 255 | 254 |
| 256 // Returns the index of the specified TabContents wrapper given its raw | 255 // Returns the index of the specified TabContents wrapper given its raw |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 | 633 |
| 635 // A scoped container for notification registries. | 634 // A scoped container for notification registries. |
| 636 NotificationRegistrar registrar_; | 635 NotificationRegistrar registrar_; |
| 637 | 636 |
| 638 TabStripSelectionModel selection_model_; | 637 TabStripSelectionModel selection_model_; |
| 639 | 638 |
| 640 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 639 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
| 641 }; | 640 }; |
| 642 | 641 |
| 643 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 642 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
| OLD | NEW |