OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_FAST_ENUMERATION_HELPER_H_ |
| 6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_FAST_ENUMERATION_HELPER_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 class WebStateList; |
| 11 |
| 12 namespace web { |
| 13 class WebState; |
| 14 } |
| 15 |
| 16 // Protocol used to get Objective-C proxies for WebStates. |
| 17 @protocol WebStateProxyFactory |
| 18 |
| 19 // Returns an Objective-C object corresponding to a given WebState. |
| 20 - (id)proxyForWebState:(web::WebState*)webState; |
| 21 |
| 22 @end |
| 23 |
| 24 // Helper class allowing NSFastEnumeration over a WebStateList. |
| 25 @interface WebStateListFastEnumerationHelper : NSObject<NSFastEnumeration> |
| 26 |
| 27 - (instancetype)initWithWebStateList:(WebStateList*)webStateList |
| 28 proxyFactory:(id<WebStateProxyFactory>)proxyFactory |
| 29 NS_DESIGNATED_INITIALIZER; |
| 30 |
| 31 - (instancetype)init NS_UNAVAILABLE; |
| 32 |
| 33 @end |
| 34 |
| 35 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_FAST_ENUMERATION_HELPER
_H_ |
OLD | NEW |