OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TABS_TAB_STRIP_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // is inokved with 2, the result is [b c A D E f]. In this example nothing | 267 // is inokved with 2, the result is [b c A D E f]. In this example nothing |
268 // special happened because the target index was <= (mini-tab-count - | 268 // special happened because the target index was <= (mini-tab-count - |
269 // selected-mini-tab-count). If the target index were 3, then the result would | 269 // selected-mini-tab-count). If the target index were 3, then the result would |
270 // be [b c A f D F]. A, being mini, can move no further than index 2. The | 270 // be [b c A f D F]. A, being mini, can move no further than index 2. The |
271 // non-mini-tabs are moved to the target index + selected-mini-tab-count (3 + | 271 // non-mini-tabs are moved to the target index + selected-mini-tab-count (3 + |
272 // 1) | 272 // 1) |
273 void MoveSelectedTabsTo(int index); | 273 void MoveSelectedTabsTo(int index); |
274 | 274 |
275 // Returns the currently active TabContents, or NULL if there is none. | 275 // Returns the currently active TabContents, or NULL if there is none. |
276 TabContents* GetActiveTabContents() const; | 276 TabContents* GetActiveTabContents() const; |
| 277 content::WebContents* GetActiveWebContents() const; |
277 | 278 |
278 // Returns the TabContents at the specified index, or NULL if there is | 279 // Returns the TabContents at the specified index, or NULL if there is |
279 // none. | 280 // none. |
280 TabContents* GetTabContentsAt(int index) const; | 281 TabContents* GetTabContentsAt(int index) const; |
| 282 content::WebContents* GetWebContentsAt(int index) const; |
281 | 283 |
282 // Returns the index of the specified TabContents, or | 284 // Returns the index of the specified TabContents, or |
283 // TabStripModel::kNoTab if the TabContents is not in this | 285 // TabStripModel::kNoTab if the TabContents is not in this |
284 // TabStripModel. | 286 // TabStripModel. |
285 int GetIndexOfTabContents(const TabContents* contents) const; | 287 int GetIndexOfTabContents(const TabContents* contents) const; |
286 | 288 |
287 // Returns the index of the specified TabContents given its raw | 289 // Returns the index of the specified TabContents given its raw |
288 // WebContents, or TabStripModel::kNoTab if the WebContents is not in this | 290 // WebContents, or TabStripModel::kNoTab if the WebContents is not in this |
289 // TabStripModel. Note: This is only needed in rare cases where the | 291 // TabStripModel. Note: This is only needed in rare cases where the |
290 // TabContents is not already present (such as implementing | 292 // TabContents is not already present (such as implementing |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 | 699 |
698 // A scoped container for notification registries. | 700 // A scoped container for notification registries. |
699 content::NotificationRegistrar registrar_; | 701 content::NotificationRegistrar registrar_; |
700 | 702 |
701 TabStripSelectionModel selection_model_; | 703 TabStripSelectionModel selection_model_; |
702 | 704 |
703 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 705 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
704 }; | 706 }; |
705 | 707 |
706 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 708 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
OLD | NEW |