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

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

Issue 2720983002: Remove windowName from CRWSessionController. (Closed)
Patch Set: Address comments. Created 3 years, 9 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/sessions/session_window_unittest.mm ('k') | ios/chrome/browser/tabs/tab.mm » ('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>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // The Passkit Dialog provider used to show the UI to download a passkit object. 107 // The Passkit Dialog provider used to show the UI to download a passkit object.
108 @property(nonatomic, assign) id<PassKitDialogProvider> passKitDialogProvider; 108 @property(nonatomic, assign) id<PassKitDialogProvider> passKitDialogProvider;
109 109
110 // The current title of the tab. 110 // The current title of the tab.
111 @property(nonatomic, readonly) NSString* title; 111 @property(nonatomic, readonly) NSString* title;
112 112
113 // Original page title or nil if the page did not provide one. 113 // Original page title or nil if the page did not provide one.
114 @property(nonatomic, readonly) NSString* originalTitle; 114 @property(nonatomic, readonly) NSString* originalTitle;
115 115
116 @property(nonatomic, readonly) NSString* urlDisplayString; 116 @property(nonatomic, readonly) NSString* urlDisplayString;
117 @property(nonatomic, readonly) NSString* windowName;
118 117
119 // ID associated with this tab. 118 // ID associated with this tab.
120 @property(nonatomic, readonly) NSString* tabId; 119 @property(nonatomic, readonly) NSString* tabId;
121 120
122 // ID of the opener of this tab. 121 // ID of the opener of this tab.
123 @property(nonatomic, readonly) NSString* openerID; 122 @property(nonatomic, readonly) NSString* openerID;
124 123
125 // NavigationIndex of the opener of this tab. 124 // NavigationIndex of the opener of this tab.
126 @property(nonatomic, readonly) NSInteger openerNavigationIndex; 125 @property(nonatomic, readonly) NSInteger openerNavigationIndex;
127 126
(...skipping 30 matching lines...) Expand all
158 157
159 // TODO(crbug.com/661663): Should this property abstract away the concept of 158 // TODO(crbug.com/661663): Should this property abstract away the concept of
160 // prerendering? Maybe this can move to the TabDelegate interface. 159 // prerendering? Maybe this can move to the TabDelegate interface.
161 @property(nonatomic, assign) BOOL isPrerenderTab; 160 @property(nonatomic, assign) BOOL isPrerenderTab;
162 @property(nonatomic, assign) BOOL isLinkLoadingPrerenderTab; 161 @property(nonatomic, assign) BOOL isLinkLoadingPrerenderTab;
163 @property(nonatomic, assign) BOOL isVoiceSearchResultsTab; 162 @property(nonatomic, assign) BOOL isVoiceSearchResultsTab;
164 163
165 // Creates a new tab with the given state. |opener| is nil unless another tab 164 // Creates a new tab with the given state. |opener| is nil unless another tab
166 // is conceptually the parent of this tab. |openedByDOM| is YES if the page was 165 // is conceptually the parent of this tab. |openedByDOM| is YES if the page was
167 // opened by DOM. |model| and |browserState| must not be nil. 166 // opened by DOM. |model| and |browserState| must not be nil.
168 - (instancetype)initWithWindowName:(NSString*)windowName 167 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState
169 opener:(Tab*)opener 168 opener:(Tab*)opener
170 openedByDOM:(BOOL)openedByDOM 169 openedByDOM:(BOOL)openedByDOM
171 model:(TabModel*)parentModel 170 model:(TabModel*)parentModel;
172 browserState:(ios::ChromeBrowserState*)browserState;
173 171
174 // Create a new tab with given web state and tab model. All must be non-nil. 172 // Create a new tab with given web state and tab model. All must be non-nil.
175 - (instancetype)initWithWebState:(std::unique_ptr<web::WebState>)webState 173 - (instancetype)initWithWebState:(std::unique_ptr<web::WebState>)webState
176 model:(TabModel*)parentModel; 174 model:(TabModel*)parentModel;
177 175
178 // Create a new tab with given web state and tab model, optionally attaching 176 // Create a new tab with given web state and tab model, optionally attaching
179 // the tab helpers (controlled by |attachTabHelpers|). All must be non-nil. 177 // the tab helpers (controlled by |attachTabHelpers|). All must be non-nil.
180 - (instancetype)initWithWebState:(std::unique_ptr<web::WebState>)webState 178 - (instancetype)initWithWebState:(std::unique_ptr<web::WebState>)webState
181 model:(TabModel*)parentModel 179 model:(TabModel*)parentModel
182 attachTabHelpers:(BOOL)attachTabHelpers 180 attachTabHelpers:(BOOL)attachTabHelpers
183 NS_DESIGNATED_INITIALIZER; 181 NS_DESIGNATED_INITIALIZER;
184 182
185 - (instancetype)init NS_UNAVAILABLE; 183 - (instancetype)init NS_UNAVAILABLE;
186 184
187 // Creates a new Tab instance loading |url| with |transition|, configured 185 // Creates a new Tab instance loading |url| with |transition|, configured
188 // with no TabModel. |opener| may be nil, and behaves exactly as for 186 // with no TabModel. |opener| may be nil, and behaves exactly as for
189 // -initWithWindowName:opener:model:browserState:. 187 // -initWithBrowserState:opener:openedByDOM:model. |configuration| is a block
190 // |configuration| is a block that will be run before |url| starts loading, 188 // that will be run before |url| starts loading, and is the correct place to set
191 // and is the correct place to set properties and delegates on the tab. 189 // properties and delegates on the tab. Calling code must take ownership of the
192 // Calling code must take ownership of the tab -- this is particularly important 190 // tab -- this is particularly important with Tab instances, because they will
193 // with Tab instances, because they will fail a DCHECK if they are deallocated 191 // fail a DCHECK if they are deallocated without -close being called.
194 // when falling out of scope without -close being called.
195 + (Tab*)newPreloadingTabWithBrowserState:(ios::ChromeBrowserState*)browserState 192 + (Tab*)newPreloadingTabWithBrowserState:(ios::ChromeBrowserState*)browserState
196 url:(const GURL&)url 193 url:(const GURL&)url
197 referrer:(const web::Referrer&)referrer 194 referrer:(const web::Referrer&)referrer
198 transition:(ui::PageTransition)transition 195 transition:(ui::PageTransition)transition
199 provider:(id<CRWNativeContentProvider>)provider 196 provider:(id<CRWNativeContentProvider>)provider
200 opener:(Tab*)opener 197 opener:(Tab*)opener
201 desktopUserAgent:(BOOL)desktopUserAgent 198 desktopUserAgent:(BOOL)desktopUserAgent
202 configuration:(void (^)(Tab*))configuration; 199 configuration:(void (^)(Tab*))configuration;
203 200
204 // Sets the parent tab model for this tab. Can only be called if the tab does 201 // Sets the parent tab model for this tab. Can only be called if the tab does
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 342
346 // Called when this tab is hidden. 343 // Called when this tab is hidden.
347 - (void)wasHidden; 344 - (void)wasHidden;
348 345
349 // Evaluates U2F result. 346 // Evaluates U2F result.
350 - (void)evaluateU2FResultFromURL:(const GURL&)url; 347 - (void)evaluateU2FResultFromURL:(const GURL&)url;
351 348
352 @end 349 @end
353 350
354 #endif // IOS_CHROME_BROWSER_TABS_TAB_H_ 351 #endif // IOS_CHROME_BROWSER_TABS_TAB_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/sessions/session_window_unittest.mm ('k') | ios/chrome/browser/tabs/tab.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698