Chromium Code Reviews| Index: ios/shared/chrome/browser/tabs/web_state_list_fast_enumeration_helper.h |
| diff --git a/ios/shared/chrome/browser/tabs/web_state_list_fast_enumeration_helper.h b/ios/shared/chrome/browser/tabs/web_state_list_fast_enumeration_helper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..10aba4d4fa34e115b906762bd309bd305cdca699 |
| --- /dev/null |
| +++ b/ios/shared/chrome/browser/tabs/web_state_list_fast_enumeration_helper.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_FAST_ENUMERATION_HELPER_H_ |
| +#define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_FAST_ENUMERATION_HELPER_H_ |
| + |
| +#import <Foundation/Foundation.h> |
| + |
| +class WebStateList; |
| + |
| +namespace web { |
| +class WebState; |
| +} |
| + |
| +// Protocol used to get Objective-C proxies for WebStates. |
| +@protocol WebStateProxyFactory |
| + |
| +// Returns an Objective-C object corresponding to a given WebState. |
| +- (id)proxyForWebState:(web::WebState*)webState; |
| + |
| +@end |
| + |
| +// Helper class allowing to perform implement NSFastEnumeration over a |
|
marq (ping after 24h)
2017/02/13 16:32:53
s/to perform implement//
sdefresne
2017/02/14 13:39:57
Done.
|
| +// WebStateList. |
| +@interface WebStateListFastEnumerationHelper : NSObject<NSFastEnumeration> |
| + |
| +- (instancetype)initWithWebStateList:(WebStateList*)webStateList |
| + proxyFactory:(id<WebStateProxyFactory>)proxyFactory |
| + NS_DESIGNATED_INITIALIZER; |
| + |
| +- (instancetype)init NS_UNAVAILABLE; |
| + |
| +@end |
| + |
| +#endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_FAST_ENUMERATION_HELPER_H_ |