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

Side by Side Diff: ios/shared/chrome/browser/tabs/web_state_list_serialization.h

Issue 2799723002: [ios] Move WebStateList to ios/chrome/browser/web_state_list. (Closed)
Patch Set: Rebase. 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_SERIALIZATION_H_
6 #define IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_SERIALIZATION_H_
7
8 #import <Foundation/Foundation.h>
9
10 #include <memory>
11
12 #include "base/callback_forward.h"
13
14 @class CRWSessionStorage;
15 class WebStateList;
16
17 namespace web {
18 class WebState;
19 }
20
21 // Factory for creating WebStates.
22 using WebStateFactory =
23 base::RepeatingCallback<std::unique_ptr<web::WebState>(CRWSessionStorage*)>;
24
25 // Returns an array of serialised sessions.
26 NSArray<CRWSessionStorage*>* SerializeWebStateList(
27 WebStateList* web_state_list);
28
29 // Restores |sessions| into |web_state_list| using |web_state_factory| for
30 // creating the restored WebStates.
31 void DeserializeWebStateList(WebStateList* web_state_list,
32 NSArray<CRWSessionStorage*>* sessions,
33 const WebStateFactory& web_state_factory);
34
35 #endif // IOS_SHARED_CHROME_BROWSER_TABS_WEB_STATE_LIST_SERIALIZATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698