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

Side by Side Diff: ios/chrome/browser/tabs/tab.h

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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/tabs/BUILD.gn ('k') | ios/chrome/browser/tabs/tab_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 #include <vector> 11 #include <vector>
12 12
13 #import "components/signin/ios/browser/manage_accounts_delegate.h" 13 #import "components/signin/ios/browser/manage_accounts_delegate.h"
14 #include "ios/net/request_tracker.h" 14 #include "ios/net/request_tracker.h"
15 #import "ios/shared/chrome/browser/tabs/web_state_handle.h"
16 #import "ios/web/public/web_state/ui/crw_web_delegate.h" 15 #import "ios/web/public/web_state/ui/crw_web_delegate.h"
17 #include "ui/base/page_transition_types.h" 16 #include "ui/base/page_transition_types.h"
18 17
19 @class AutofillController; 18 @class AutofillController;
20 @class AutoReloadBridge; 19 @class AutoReloadBridge;
21 @class CastController; 20 @class CastController;
22 @protocol CRWNativeContentProvider; 21 @protocol CRWNativeContentProvider;
23 @class CRWSessionEntry; 22 @class CRWSessionEntry;
24 @class CRWWebController; 23 @class CRWWebController;
25 @class ExternalAppLauncher; 24 @class ExternalAppLauncher;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 56
58 namespace sessions { 57 namespace sessions {
59 class SerializedNavigationEntry; 58 class SerializedNavigationEntry;
60 struct SessionTab; 59 struct SessionTab;
61 } 60 }
62 61
63 namespace web { 62 namespace web {
64 class NavigationManagerImpl; 63 class NavigationManagerImpl;
65 struct Referrer; 64 struct Referrer;
66 class WebState; 65 class WebState;
66 class WebStateImpl;
67 } 67 }
68 68
69 // Notification sent by a Tab when it starts to load a new URL. This 69 // Notification sent by a Tab when it starts to load a new URL. This
70 // notification must only be used for crash reporting as it is also sent for 70 // notification must only be used for crash reporting as it is also sent for
71 // pre-rendered tabs. 71 // pre-rendered tabs.
72 extern NSString* const kTabUrlStartedLoadingNotificationForCrashReporting; 72 extern NSString* const kTabUrlStartedLoadingNotificationForCrashReporting;
73 73
74 // Notification sent by a Tab when it is likely about to start loading a new 74 // Notification sent by a Tab when it is likely about to start loading a new
75 // URL. This notification must only be used for crash reporting as it is also 75 // URL. This notification must only be used for crash reporting as it is also
76 // sent for pre-rendered tabs. 76 // sent for pre-rendered tabs.
(...skipping 14 matching lines...) Expand all
91 91
92 // The header name and value for the data reduction proxy to request an image to 92 // The header name and value for the data reduction proxy to request an image to
93 // be reloaded without optimizations. 93 // be reloaded without optimizations.
94 extern NSString* const kProxyPassthroughHeaderName; 94 extern NSString* const kProxyPassthroughHeaderName;
95 extern NSString* const kProxyPassthroughHeaderValue; 95 extern NSString* const kProxyPassthroughHeaderValue;
96 96
97 // Information related to a single tab. The CRWWebController is similar to 97 // Information related to a single tab. The CRWWebController is similar to
98 // desktop Chrome's TabContents in that it encapsulates rendering. Acts as the 98 // desktop Chrome's TabContents in that it encapsulates rendering. Acts as the
99 // delegate for the CRWWebController in order to process info about pages having 99 // delegate for the CRWWebController in order to process info about pages having
100 // loaded. 100 // loaded.
101 @interface Tab 101 @interface Tab : NSObject<CRWWebDelegate, ManageAccountsDelegate>
102 : NSObject<CRWWebDelegate, ManageAccountsDelegate, WebStateHandle>
103 102
104 // Browser state associated with this Tab. 103 // Browser state associated with this Tab.
105 @property(nonatomic, readonly) ios::ChromeBrowserState* browserState; 104 @property(nonatomic, readonly) ios::ChromeBrowserState* browserState;
106 105
107 // TODO(crbug.com/546208): Eliminate this; replace calls with either visible URL 106 // TODO(crbug.com/546208): Eliminate this; replace calls with either visible URL
108 // or last committed URL, depending on the specific use case. 107 // or last committed URL, depending on the specific use case.
109 // Do not add new calls to this method. 108 // Do not add new calls to this method.
110 @property(nonatomic, readonly) const GURL& url; 109 @property(nonatomic, readonly) const GURL& url;
111 110
112 // The Passkit Dialog provider used to show the UI to download a passkit object. 111 // The Passkit Dialog provider used to show the UI to download a passkit object.
113 @property(nonatomic, assign) id<PassKitDialogProvider> passKitDialogProvider; 112 @property(nonatomic, assign) id<PassKitDialogProvider> passKitDialogProvider;
114 113
115 // The current title of the tab. 114 // The current title of the tab.
116 @property(nonatomic, readonly) NSString* title; 115 @property(nonatomic, readonly) NSString* title;
117 116
118 // Original page title or nil if the page did not provide one. 117 // Original page title or nil if the page did not provide one.
119 @property(nonatomic, readonly) NSString* originalTitle; 118 @property(nonatomic, readonly) NSString* originalTitle;
120 119
121 @property(nonatomic, readonly) NSString* urlDisplayString; 120 @property(nonatomic, readonly) NSString* urlDisplayString;
122 @property(nonatomic, readonly) NSString* windowName; 121 @property(nonatomic, readonly) NSString* windowName;
123 122
124 // ID associated with this tab, from the SessionManager. 123 // ID associated with this tab, from the SessionManager.
125 @property(nonatomic, readonly) NSString* tabId; 124 @property(nonatomic, readonly) NSString* tabId;
126 125
127 // |YES| if snapshot overlay should load from the grey image cache. 126 // |YES| if snapshot overlay should load from the grey image cache.
128 @property(nonatomic, assign) BOOL useGreyImageCache; 127 @property(nonatomic, assign) BOOL useGreyImageCache;
129 128
129 // webStateImpl is deprecated: use webState instead.
130 @property(nonatomic, readonly) web::WebStateImpl* webStateImpl;
131 @property(nonatomic, readonly) web::WebState* webState;
132
130 @property(nonatomic, readonly) CRWWebController* webController; 133 @property(nonatomic, readonly) CRWWebController* webController;
131 @property(nonatomic, readonly) PasswordController* passwordController; 134 @property(nonatomic, readonly) PasswordController* passwordController;
132 @property(nonatomic, readonly) BOOL canGoBack; 135 @property(nonatomic, readonly) BOOL canGoBack;
133 @property(nonatomic, readonly) BOOL canGoForward; 136 @property(nonatomic, readonly) BOOL canGoForward;
134 @property(nonatomic, assign) id<TabDelegate> delegate; 137 @property(nonatomic, assign) id<TabDelegate> delegate;
135 @property(nonatomic, assign) id<TabHeadersDelegate> tabHeadersDelegate; 138 @property(nonatomic, assign) id<TabHeadersDelegate> tabHeadersDelegate;
136 @property(nonatomic, assign) id<TabSnapshottingDelegate> 139 @property(nonatomic, assign) id<TabSnapshottingDelegate>
137 tabSnapshottingDelegate; 140 tabSnapshottingDelegate;
138 @property(nonatomic, readonly) BOOL useDesktopUserAgent; 141 @property(nonatomic, readonly) BOOL useDesktopUserAgent;
139 @property(nonatomic, assign) id<StoreKitLauncher> storeKitLauncher; 142 @property(nonatomic, assign) id<StoreKitLauncher> storeKitLauncher;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 338
336 // Called when this tab is hidden. 339 // Called when this tab is hidden.
337 - (void)wasHidden; 340 - (void)wasHidden;
338 341
339 // Evaluates U2F result. 342 // Evaluates U2F result.
340 - (void)evaluateU2FResultFromURL:(const GURL&)url; 343 - (void)evaluateU2FResultFromURL:(const GURL&)url;
341 344
342 @end 345 @end
343 346
344 #endif // IOS_CHROME_BROWSER_TABS_TAB_H_ 347 #endif // IOS_CHROME_BROWSER_TABS_TAB_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/BUILD.gn ('k') | ios/chrome/browser/tabs/tab_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698