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

Unified Diff: ios/chrome/browser/tabs/tab_model.h

Issue 2640093004: WebStateList is an array of web::WebState* wrappers. (Closed)
Patch Set: Fix leaks (caught by unit tests). 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/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/tabs/tab_model.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab_model.h
diff --git a/ios/chrome/browser/tabs/tab_model.h b/ios/chrome/browser/tabs/tab_model.h
index e2e0a8fe112a3342ee07343e5b5760001e800d1e..bb888ac51612c6b6585ebfb0493e9d732149ea76 100644
--- a/ios/chrome/browser/tabs/tab_model.h
+++ b/ios/chrome/browser/tabs/tab_model.h
@@ -10,6 +10,8 @@
#include <memory>
+#import "ios/chrome/browser/tabs/tab.h"
+#import "ios/shared/chrome/browser/tabs/web_state_list.h"
#import "ios/web/public/navigation_manager.h"
#include "ui/base/page_transition_types.h"
@@ -17,7 +19,6 @@ class GURL;
class SessionID;
@class SessionServiceIOS;
@class SessionWindowIOS;
-@class Tab;
@protocol TabModelObserver;
class TabModelSyncedWindowDelegate;
class TabUsageRecorder;
@@ -81,7 +82,7 @@ NSUInteger const kTabPositionAutomatically = NSNotFound;
// The model knows about the currently selected tab in order to maintain
// consistency between multiple views that need the current tab to be
// synchronized.
-@interface TabModel : NSObject<NSFastEnumeration>
+@interface TabModel : WebStateList<Tab*>
// Currently active tab.
@property(nonatomic, weak) Tab* currentTab;
@@ -112,9 +113,6 @@ NSUInteger const kTabPositionAutomatically = NSNotFound;
// NO if the model has at least one tab.
@property(nonatomic, readonly, getter=isEmpty) BOOL empty;
-// Determines the number of tabs in the model.
-@property(nonatomic, readonly) NSUInteger count;
-
// Initializes tabs from a restored session. |-setCurrentTab| needs to be called
// in order to display the views associated with the tabs. Waits until the views
// are ready. |browserState| cannot be nil. |service| cannot be nil; this class
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/tabs/tab_model.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698