| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 188   // different NavigationController. This is used through the recently | 188   // different NavigationController. This is used through the recently | 
| 189   // closed tabs list, which needs to replace a tab's current state | 189   // closed tabs list, which needs to replace a tab's current state | 
| 190   // and history with another set of contents and history. | 190   // and history with another set of contents and history. | 
| 191   // | 191   // | 
| 192   // The old NavigationController is deallocated and this object takes | 192   // The old NavigationController is deallocated and this object takes | 
| 193   // ownership of the passed in controller. | 193   // ownership of the passed in controller. | 
| 194   // XXXPINK This API is weird and wrong. Remove it or change it or rename it? | 194   // XXXPINK This API is weird and wrong. Remove it or change it or rename it? | 
| 195   void ReplaceNavigationControllerAt(int index, | 195   void ReplaceNavigationControllerAt(int index, | 
| 196                                      TabContentsWrapper* contents); | 196                                      TabContentsWrapper* contents); | 
| 197 | 197 | 
| 198   // Replaces the tab contents at |index| with |new_contents|. This deletes the | 198   // Replaces the tab contents at |index| with |new_contents|. The | 
| 199   // TabContents currently at |index|. | 199   // TabContentsWrapper that was at |index| is returned and ownership returns | 
| 200   void ReplaceTabContentsAt(int index, TabContentsWrapper* new_contents); | 200   // to the caller. | 
|  | 201   TabContentsWrapper* ReplaceTabContentsAt(int index, | 
|  | 202                                            TabContentsWrapper* new_contents); | 
| 201 | 203 | 
| 202   // Detaches the TabContents at the specified index from this strip. The | 204   // Detaches the TabContents at the specified index from this strip. The | 
| 203   // TabContents is not destroyed, just removed from display. The caller is | 205   // TabContents is not destroyed, just removed from display. The caller is | 
| 204   // responsible for doing something with it (e.g. stuffing it into another | 206   // responsible for doing something with it (e.g. stuffing it into another | 
| 205   // strip). | 207   // strip). | 
| 206   TabContentsWrapper* DetachTabContentsAt(int index); | 208   TabContentsWrapper* DetachTabContentsAt(int index); | 
| 207 | 209 | 
| 208   // Select the TabContents at the specified index. |user_gesture| is true if | 210   // Select the TabContents at the specified index. |user_gesture| is true if | 
| 209   // the user actually clicked on the tab or navigated to it using a keyboard | 211   // the user actually clicked on the tab or navigated to it using a keyboard | 
| 210   // command, false if the tab was selected as a by-product of some other | 212   // command, false if the tab was selected as a by-product of some other | 
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 560   typedef ObserverList<TabStripModelObserver> TabStripModelObservers; | 562   typedef ObserverList<TabStripModelObserver> TabStripModelObservers; | 
| 561   TabStripModelObservers observers_; | 563   TabStripModelObservers observers_; | 
| 562 | 564 | 
| 563   // A scoped container for notification registries. | 565   // A scoped container for notification registries. | 
| 564   NotificationRegistrar registrar_; | 566   NotificationRegistrar registrar_; | 
| 565 | 567 | 
| 566   DISALLOW_COPY_AND_ASSIGN(TabStripModel); | 568   DISALLOW_COPY_AND_ASSIGN(TabStripModel); | 
| 567 }; | 569 }; | 
| 568 | 570 | 
| 569 #endif  // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 571 #endif  // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 
| OLD | NEW | 
|---|