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

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

Issue 2802763002: [ios] Cleanup SessionServiceIOS implementation. (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". For iOS, there
13 // will only be one window at a time. 13 // will only be one window at a time.
14 @interface SessionWindowIOS : NSObject<NSCoding> 14 @interface SessionWindowIOS : NSObject<NSCoding>
15 15
16 // Initializes SessionsWindowIOS using the parameters are initial values for 16 // Initializes SessionsWindowIOS using the parameters are initial values for
17 // the |sessions| and |selectedIndex| properties. |selectedIndex| must be a 17 // the |sessions| and |selectedIndex| properties. |selectedIndex| must be a
18 // valid indice in |sessions| or NSNotFound if |sessions| is empty. 18 // valid indice in |sessions| or NSNotFound if |sessions| is empty.
19 - (instancetype)initWithSessions:(NSArray<CRWSessionStorage*>*)sessions 19 - (instancetype)initWithSessions:(NSArray<CRWSessionStorage*>*)sessions
20 selectedIndex:(NSUInteger)selectedIndex 20 selectedIndex:(NSUInteger)selectedIndex
21 NS_DESIGNATED_INITIALIZER; 21 NS_DESIGNATED_INITIALIZER;
22 22
23 // Clears all added sessions.
24 - (void)clearSessions;
25
26 // The serialized session objects. 23 // The serialized session objects.
27 @property(nonatomic, readonly) NSArray<CRWSessionStorage*>* sessions; 24 @property(nonatomic, readonly) NSArray<CRWSessionStorage*>* sessions;
28 25
29 // The currently selected session. NSNotFound if the sessionWindow contains 26 // The currently selected session. NSNotFound if the sessionWindow contains
30 // no sessions; otherwise a valid index in |sessions|. 27 // no sessions; otherwise a valid index in |sessions|.
31 @property(nonatomic, readonly) NSUInteger selectedIndex; 28 @property(nonatomic, readonly) NSUInteger selectedIndex;
32 29
33 @end 30 @end
34 31
35 #endif // IOS_CHROME_BROWSER_SESSIONS_SESSION_WINDOW_IOS_H_ 32 #endif // IOS_CHROME_BROWSER_SESSIONS_SESSION_WINDOW_IOS_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/sessions/session_util.mm ('k') | ios/chrome/browser/sessions/session_window_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698