| 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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 // Returns true if the WebContents at |index| has been discarded to | 372 // Returns true if the WebContents at |index| has been discarded to |
| 373 // save memory. See DiscardTabContentsAt() for details. | 373 // save memory. See DiscardTabContentsAt() for details. |
| 374 bool IsTabDiscarded(int index) const; | 374 bool IsTabDiscarded(int index) const; |
| 375 | 375 |
| 376 // Returns the index of the first tab that is not a mini-tab. This returns | 376 // Returns the index of the first tab that is not a mini-tab. This returns |
| 377 // |count()| if all of the tabs are mini-tabs, and 0 if none of the tabs are | 377 // |count()| if all of the tabs are mini-tabs, and 0 if none of the tabs are |
| 378 // mini-tabs. | 378 // mini-tabs. |
| 379 int IndexOfFirstNonMiniTab() const; | 379 int IndexOfFirstNonMiniTab() const; |
| 380 | 380 |
| 381 // Returns the index of the first tab that is blocked. This returns |
| 382 // |count()| if no tabs are blocked. |
| 383 int IndexOfFirstBlockedTab() const; |
| 384 |
| 381 // Returns a valid index for inserting a new tab into this model. |index| is | 385 // Returns a valid index for inserting a new tab into this model. |index| is |
| 382 // the proposed index and |mini_tab| is true if inserting a tab will become | 386 // the proposed index and |mini_tab| is true if inserting a tab will become |
| 383 // mini (pinned or app). If |mini_tab| is true, the returned index is between | 387 // mini (pinned or app). If |mini_tab| is true, the returned index is between |
| 384 // 0 and IndexOfFirstNonMiniTab. If |mini_tab| is false, the returned index | 388 // 0 and IndexOfFirstNonMiniTab. If |mini_tab| is false, the returned index |
| 385 // is between IndexOfFirstNonMiniTab and count(). | 389 // is between IndexOfFirstNonMiniTab and count(). |
| 386 int ConstrainInsertionIndex(int index, bool mini_tab); | 390 int ConstrainInsertionIndex(int index, bool mini_tab); |
| 387 | 391 |
| 388 // Extends the selection from the anchor to |index|. | 392 // Extends the selection from the anchor to |index|. |
| 389 void ExtendSelectionTo(int index); | 393 void ExtendSelectionTo(int index); |
| 390 | 394 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 | 677 |
| 674 // A scoped container for notification registries. | 678 // A scoped container for notification registries. |
| 675 content::NotificationRegistrar registrar_; | 679 content::NotificationRegistrar registrar_; |
| 676 | 680 |
| 677 TabStripSelectionModel selection_model_; | 681 TabStripSelectionModel selection_model_; |
| 678 | 682 |
| 679 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 683 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
| 680 }; | 684 }; |
| 681 | 685 |
| 682 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 686 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
| OLD | NEW |