| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 // class for details on this. | 311 // class for details on this. |
| 312 void SetTabPinned(int index, bool pinned); | 312 void SetTabPinned(int index, bool pinned); |
| 313 | 313 |
| 314 // Returns true if the tab at |index| is pinned. | 314 // Returns true if the tab at |index| is pinned. |
| 315 // See description above class for details on pinned tabs. | 315 // See description above class for details on pinned tabs. |
| 316 bool IsTabPinned(int index) const; | 316 bool IsTabPinned(int index) const; |
| 317 | 317 |
| 318 // Returns true if the tab at |index| is blocked by a tab modal dialog. | 318 // Returns true if the tab at |index| is blocked by a tab modal dialog. |
| 319 bool IsTabBlocked(int index) const; | 319 bool IsTabBlocked(int index) const; |
| 320 | 320 |
| 321 // Returns true if the WebContents at |index| has been discarded to | |
| 322 // save memory. See DiscardWebContentsAt() for details. | |
| 323 bool IsTabDiscarded(int index) const; | |
| 324 | |
| 325 // Returns the index of the first tab that is not a pinned tab. This returns | 321 // Returns the index of the first tab that is not a pinned tab. This returns |
| 326 // |count()| if all of the tabs are pinned tabs, and 0 if none of the tabs are | 322 // |count()| if all of the tabs are pinned tabs, and 0 if none of the tabs are |
| 327 // pinned tabs. | 323 // pinned tabs. |
| 328 int IndexOfFirstNonPinnedTab() const; | 324 int IndexOfFirstNonPinnedTab() const; |
| 329 | 325 |
| 330 // Returns a valid index for inserting a new tab into this model. |index| is | 326 // Returns a valid index for inserting a new tab into this model. |index| is |
| 331 // the proposed index and |pinned_tab| is true if inserting a tab will become | 327 // the proposed index and |pinned_tab| is true if inserting a tab will become |
| 332 // pinned (pinned). If |pinned_tab| is true, the returned index is between 0 | 328 // pinned (pinned). If |pinned_tab| is true, the returned index is between 0 |
| 333 // and IndexOfFirstNonPinnedTab. If |pinned_tab| is false, the returned index | 329 // and IndexOfFirstNonPinnedTab. If |pinned_tab| is false, the returned index |
| 334 // is between IndexOfFirstNonPinnedTab and count(). | 330 // is between IndexOfFirstNonPinnedTab and count(). |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 | 555 |
| 560 // TODO(sky): remove this; used for debugging 291265. | 556 // TODO(sky): remove this; used for debugging 291265. |
| 561 bool in_notify_; | 557 bool in_notify_; |
| 562 | 558 |
| 563 base::WeakPtrFactory<TabStripModel> weak_factory_; | 559 base::WeakPtrFactory<TabStripModel> weak_factory_; |
| 564 | 560 |
| 565 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 561 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
| 566 }; | 562 }; |
| 567 | 563 |
| 568 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 564 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
| OLD | NEW |