Chromium Code Reviews| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 // especially on Chrome OS. The tab reloads if the user clicks on it. | 220 // especially on Chrome OS. The tab reloads if the user clicks on it. |
| 221 // Returns an empty TabContents, used only for testing. | 221 // Returns an empty TabContents, used only for testing. |
| 222 TabContents* DiscardTabContentsAt(int index); | 222 TabContents* DiscardTabContentsAt(int index); |
| 223 | 223 |
| 224 // Detaches the TabContents at the specified index from this strip. The | 224 // Detaches the TabContents at the specified index from this strip. The |
| 225 // TabContents is not destroyed, just removed from display. The caller | 225 // TabContents is not destroyed, just removed from display. The caller |
| 226 // is responsible for doing something with it (e.g. stuffing it into another | 226 // is responsible for doing something with it (e.g. stuffing it into another |
| 227 // strip). | 227 // strip). |
| 228 TabContents* DetachTabContentsAt(int index); | 228 TabContents* DetachTabContentsAt(int index); |
| 229 | 229 |
| 230 // Detached the TabContents like DetachTabContentsAt, however, | |
| 231 // CreateHistoricalTab is invoked on the delegate. The caller can use | |
| 232 // this to hide the tab while unload handlers run. The caller is responsible | |
| 233 // for destroying the tab. | |
| 234 TabContents* DetachTabContentsAndCreateHistoryAt(int index); | |
|
Avi (use Gerrit)
2012/11/15 18:56:43
I don't see the point in having this. It's a two l
slamm_google
2012/11/15 22:20:36
It felt wrong to me too. Thank you for the alterna
| |
| 235 | |
| 230 // Makes the tab at the specified index the active tab. |user_gesture| is true | 236 // Makes the tab at the specified index the active tab. |user_gesture| is true |
| 231 // if the user actually clicked on the tab or navigated to it using a keyboard | 237 // if the user actually clicked on the tab or navigated to it using a keyboard |
| 232 // command, false if the tab was activated as a by-product of some other | 238 // command, false if the tab was activated as a by-product of some other |
| 233 // action. | 239 // action. |
| 234 void ActivateTabAt(int index, bool user_gesture); | 240 void ActivateTabAt(int index, bool user_gesture); |
| 235 | 241 |
| 236 // Adds tab at |index| to the currently selected tabs, without changing the | 242 // Adds tab at |index| to the currently selected tabs, without changing the |
| 237 // active tab index. | 243 // active tab index. |
| 238 void AddTabAtToSelection(int index); | 244 void AddTabAtToSelection(int index); |
| 239 | 245 |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 673 | 679 |
| 674 // A scoped container for notification registries. | 680 // A scoped container for notification registries. |
| 675 content::NotificationRegistrar registrar_; | 681 content::NotificationRegistrar registrar_; |
| 676 | 682 |
| 677 TabStripSelectionModel selection_model_; | 683 TabStripSelectionModel selection_model_; |
| 678 | 684 |
| 679 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 685 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
| 680 }; | 686 }; |
| 681 | 687 |
| 682 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 688 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
| OLD | NEW |