| 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_H_ | 5 #ifndef IOS_CHROME_BROWSER_TABS_TAB_H_ |
| 6 #define IOS_CHROME_BROWSER_TABS_TAB_H_ | 6 #define IOS_CHROME_BROWSER_TABS_TAB_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // is conceptually the parent of this tab. |openedByDOM| is YES if the page was | 158 // is conceptually the parent of this tab. |openedByDOM| is YES if the page was |
| 159 // opened by DOM. |model| and |browserState| must not be nil. | 159 // opened by DOM. |model| and |browserState| must not be nil. |
| 160 - (instancetype)initWithWindowName:(NSString*)windowName | 160 - (instancetype)initWithWindowName:(NSString*)windowName |
| 161 opener:(Tab*)opener | 161 opener:(Tab*)opener |
| 162 openedByDOM:(BOOL)openedByDOM | 162 openedByDOM:(BOOL)openedByDOM |
| 163 model:(TabModel*)parentModel | 163 model:(TabModel*)parentModel |
| 164 browserState:(ios::ChromeBrowserState*)browserState; | 164 browserState:(ios::ChromeBrowserState*)browserState; |
| 165 | 165 |
| 166 // Create a new tab with given web state and tab model. All must be non-nil. | 166 // Create a new tab with given web state and tab model. All must be non-nil. |
| 167 - (instancetype)initWithWebState:(std::unique_ptr<web::WebState>)webState | 167 - (instancetype)initWithWebState:(std::unique_ptr<web::WebState>)webState |
| 168 model:(TabModel*)parentModel; |
| 169 |
| 170 // Create a new tab with given web state and tab model, optionally attaching |
| 171 // the tab helpers (controlled by |attachTabHelpers|). All must be non-nil. |
| 172 - (instancetype)initWithWebState:(std::unique_ptr<web::WebState>)webState |
| 168 model:(TabModel*)parentModel | 173 model:(TabModel*)parentModel |
| 174 attachTabHelpers:(BOOL)attachTabHelpers |
| 169 NS_DESIGNATED_INITIALIZER; | 175 NS_DESIGNATED_INITIALIZER; |
| 170 | 176 |
| 171 - (instancetype)init NS_UNAVAILABLE; | 177 - (instancetype)init NS_UNAVAILABLE; |
| 172 | 178 |
| 173 // Creates a new Tab instance loading |url| with |transition|, configured | 179 // Creates a new Tab instance loading |url| with |transition|, configured |
| 174 // with no TabModel. |opener| may be nil, and behaves exactly as for | 180 // with no TabModel. |opener| may be nil, and behaves exactly as for |
| 175 // -initWithWindowName:opener:model:browserState:. | 181 // -initWithWindowName:opener:model:browserState:. |
| 176 // |configuration| is a block that will be run before |url| starts loading, | 182 // |configuration| is a block that will be run before |url| starts loading, |
| 177 // and is the correct place to set properties and delegates on the tab. | 183 // and is the correct place to set properties and delegates on the tab. |
| 178 // Calling code must take ownership of the tab -- this is particularly important | 184 // Calling code must take ownership of the tab -- this is particularly important |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 340 |
| 335 // Called when this tab is hidden. | 341 // Called when this tab is hidden. |
| 336 - (void)wasHidden; | 342 - (void)wasHidden; |
| 337 | 343 |
| 338 // Evaluates U2F result. | 344 // Evaluates U2F result. |
| 339 - (void)evaluateU2FResultFromURL:(const GURL&)url; | 345 - (void)evaluateU2FResultFromURL:(const GURL&)url; |
| 340 | 346 |
| 341 @end | 347 @end |
| 342 | 348 |
| 343 #endif // IOS_CHROME_BROWSER_TABS_TAB_H_ | 349 #endif // IOS_CHROME_BROWSER_TABS_TAB_H_ |
| OLD | NEW |