| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 IOS_CHROME_BROWSER_TABS_TAB_MODEL_H_ | 5 #ifndef IOS_CHROME_BROWSER_TABS_TAB_MODEL_H_ |
| 6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_H_ | 6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #import <UIKit/UIKit.h> | 9 #import <UIKit/UIKit.h> |
| 10 | 10 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // Placing anew tab in its proper location along the tab strip is based on the | 157 // Placing anew tab in its proper location along the tab strip is based on the |
| 158 // tab's 'opener' tab, the tab from which the new tab was opened. For the user, | 158 // tab's 'opener' tab, the tab from which the new tab was opened. For the user, |
| 159 // that does not mean the tab in UI terms, but the page from which the new tab | 159 // that does not mean the tab in UI terms, but the page from which the new tab |
| 160 // is opened. Currently, to best provide this behavior, the session ID of the | 160 // is opened. Currently, to best provide this behavior, the session ID of the |
| 161 // tab is supplemented with its navigation index. If both those items match, it | 161 // tab is supplemented with its navigation index. If both those items match, it |
| 162 // is assumed that the tabs belong to the same owner's group. Note that using | 162 // is assumed that the tabs belong to the same owner's group. Note that using |
| 163 // navigation index is a limited solution, and may in some cases be incorrect, | 163 // navigation index is a limited solution, and may in some cases be incorrect, |
| 164 // as forward or back navigations (incrementing/decrementing the navigation | 164 // as forward or back navigations (incrementing/decrementing the navigation |
| 165 // index) may result in incorrect tab pairings. | 165 // index) may result in incorrect tab pairings. |
| 166 | 166 |
| 167 // Returns the first tab in the model opened by the specified tab at its current | |
| 168 // navigation index. The search starts at the beginning of the list and stops at | |
| 169 // |tab|. Returns nil if no tab meets these constraints. | |
| 170 - (Tab*)firstTabWithOpener:(Tab*)tab; | |
| 171 // Returns the last tab in the model opened by the specified tab at its current | 167 // Returns the last tab in the model opened by the specified tab at its current |
| 172 // navigation index. The search starts at |tab|. Returns nil if no tab meets | 168 // navigation index. The search starts at |tab|. Returns nil if no tab meets |
| 173 // these constraints. | 169 // these constraints. |
| 174 - (Tab*)lastTabWithOpener:(Tab*)tab; | 170 - (Tab*)lastTabWithOpener:(Tab*)tab; |
| 175 | 171 |
| 176 // Returns the tab which opened this tab, or nil if it's not a child. | 172 // Returns the tab which opened this tab, or nil if it's not a child. |
| 177 - (Tab*)openerOfTab:(Tab*)tab; | 173 - (Tab*)openerOfTab:(Tab*)tab; |
| 178 | 174 |
| 179 // Add/modify tabs. | 175 // Add/modify tabs. |
| 180 | 176 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // TYPED. | 303 // TYPED. |
| 308 - (Tab*)insertTabWithURL:(const GURL&)URL | 304 - (Tab*)insertTabWithURL:(const GURL&)URL |
| 309 referrer:(const web::Referrer&)referrer | 305 referrer:(const web::Referrer&)referrer |
| 310 windowName:(NSString*)windowName | 306 windowName:(NSString*)windowName |
| 311 opener:(Tab*)parentTab | 307 opener:(Tab*)parentTab |
| 312 atIndex:(NSUInteger)index; | 308 atIndex:(NSUInteger)index; |
| 313 | 309 |
| 314 @end | 310 @end |
| 315 | 311 |
| 316 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_H_ | 312 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_H_ |
| OLD | NEW |