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

Side by Side Diff: ios/chrome/browser/sessions/session_window_ios.h

Issue 2811593004: [ios] Allow having multiple session windows in a session. (Closed)
Patch Set: Address comments. Created 3 years, 8 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
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_SESSIONS_SESSION_WINDOW_IOS_H_ 5 #ifndef IOS_CHROME_BROWSER_SESSIONS_SESSION_WINDOW_IOS_H_
6 #define IOS_CHROME_BROWSER_SESSIONS_SESSION_WINDOW_IOS_H_ 6 #define IOS_CHROME_BROWSER_SESSIONS_SESSION_WINDOW_IOS_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 @class CRWSessionStorage; 10 @class CRWSessionStorage;
11 11
12 // Encapsulates everything required to save a session "window". For iOS, there 12 // Encapsulates everything required to save a session "window".
13 // will only be one window at a time.
14 @interface SessionWindowIOS : NSObject<NSCoding> 13 @interface SessionWindowIOS : NSObject<NSCoding>
15 14
16 // Initializes SessionsWindowIOS using the parameters are initial values for 15 // Initializes SessionsWindowIOS using the parameters are initial values for
17 // the |sessions| and |selectedIndex| properties. |selectedIndex| must be a 16 // the |sessions| and |selectedIndex| properties. |selectedIndex| must be a
18 // valid indice in |sessions| or NSNotFound if |sessions| is empty. 17 // valid indice in |sessions| or NSNotFound if |sessions| is empty.
19 - (instancetype)initWithSessions:(NSArray<CRWSessionStorage*>*)sessions 18 - (instancetype)initWithSessions:(NSArray<CRWSessionStorage*>*)sessions
20 selectedIndex:(NSUInteger)selectedIndex 19 selectedIndex:(NSUInteger)selectedIndex
21 NS_DESIGNATED_INITIALIZER; 20 NS_DESIGNATED_INITIALIZER;
22 21
23 // The serialized session objects. 22 // The serialized session objects. May be empty but never nil.
24 @property(nonatomic, readonly) NSArray<CRWSessionStorage*>* sessions; 23 @property(nonatomic, readonly) NSArray<CRWSessionStorage*>* sessions;
25 24
26 // The currently selected session. NSNotFound if the sessionWindow contains 25 // The currently selected session. NSNotFound if the sessionWindow contains
27 // no sessions; otherwise a valid index in |sessions|. 26 // no sessions; otherwise a valid index in |sessions|.
28 @property(nonatomic, readonly) NSUInteger selectedIndex; 27 @property(nonatomic, readonly) NSUInteger selectedIndex;
29 28
30 @end 29 @end
31 30
32 #endif // IOS_CHROME_BROWSER_SESSIONS_SESSION_WINDOW_IOS_H_ 31 #endif // IOS_CHROME_BROWSER_SESSIONS_SESSION_WINDOW_IOS_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/sessions/session_service_ios_unittest.mm ('k') | ios/chrome/browser/sessions/test_session_service.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698