Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Unified Diff: ios/shared/chrome/browser/tabs/web_state_list.mm

Issue 2649403002: Revert of WebStateList is an array of web::WebState* wrappers. (Closed)
Patch Set: Fix conflicts with other CLs. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/shared/chrome/browser/tabs/web_state_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/shared/chrome/browser/tabs/web_state_list.mm
diff --git a/ios/shared/chrome/browser/tabs/web_state_list.mm b/ios/shared/chrome/browser/tabs/web_state_list.mm
deleted file mode 100644
index 2536117e9c6295dc7e62b96123c445fdbb5aa06f..0000000000000000000000000000000000000000
--- a/ios/shared/chrome/browser/tabs/web_state_list.mm
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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.
-
-#import "ios/shared/chrome/browser/tabs/web_state_list.h"
-
-#include "base/logging.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-@implementation WebStateList {
- NSMutableArray<id<WebStateHandle>>* _list;
-}
-
-#pragma mark - Lifecycle
-
-- (instancetype)init {
- if ((self = [super init])) {
- _list = [[NSMutableArray alloc] init];
- }
- return self;
-}
-
-#pragma mark - NSFastEnumeration
-
-- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState*)state
- objects:(id __unsafe_unretained*)buffer
- count:(NSUInteger)len {
- return [_list countByEnumeratingWithState:state objects:buffer count:len];
-}
-
-#pragma mark - Properties
-
-- (NSUInteger)count {
- return _list.count;
-}
-
-- (id<WebStateHandle>)firstWebState {
- return _list.firstObject;
-}
-
-#pragma mark - Public methods, mutation
-
-- (void)addWebState:(id<WebStateHandle>)webState {
- [_list addObject:webState];
-}
-
-- (void)insertWebState:(id<WebStateHandle>)webState atIndex:(NSUInteger)index {
- [_list insertObject:webState atIndex:index];
-}
-
-- (void)replaceWebStateAtIndex:(NSUInteger)index
- withWebState:(id<WebStateHandle>)webState {
- [_list replaceObjectAtIndex:index withObject:webState];
-}
-
-- (void)removeWebState:(id<WebStateHandle>)webState {
- [_list removeObject:webState];
-}
-
-#pragma mark - Public methods, queries
-
-- (BOOL)containsWebState:(id<WebStateHandle>)webState {
- return [_list containsObject:webState];
-}
-
-- (id<WebStateHandle>)webStateAtIndex:(NSUInteger)index {
- DCHECK_LT(index, _list.count);
- return [_list objectAtIndex:index];
-}
-
-- (NSUInteger)indexOfWebState:(id<WebStateHandle>)webState {
- return [_list indexOfObject:webState];
-}
-
-@end
« no previous file with comments | « ios/shared/chrome/browser/tabs/web_state_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698