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

Side by Side Diff: ios/web/public/web_state/web_state.h

Issue 2802613005: Add a comment and DCHECK to require |session_storage| to be non-nil in WebState::CreateWithStorageS… (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | ios/web/web_state/web_state_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // The transition type of navigation. 86 // The transition type of navigation.
87 ui::PageTransition transition; 87 ui::PageTransition transition;
88 88
89 // Whether this navigation is initiated by the renderer process. 89 // Whether this navigation is initiated by the renderer process.
90 bool is_renderer_initiated; 90 bool is_renderer_initiated;
91 }; 91 };
92 92
93 // Creates a new WebState. 93 // Creates a new WebState.
94 static std::unique_ptr<WebState> Create(const CreateParams& params); 94 static std::unique_ptr<WebState> Create(const CreateParams& params);
95 95
96 // Creates a new WebState from a serialized NavigationManager. 96 // Creates a new WebState from a serialized representation of the session.
97 // |session_storage| must not be nil.
97 static std::unique_ptr<WebState> CreateWithStorageSession( 98 static std::unique_ptr<WebState> CreateWithStorageSession(
98 const CreateParams& params, 99 const CreateParams& params,
99 CRWSessionStorage* session_storage); 100 CRWSessionStorage* session_storage);
100 101
101 ~WebState() override {} 102 ~WebState() override {}
102 103
103 // Gets/Sets the delegate. 104 // Gets/Sets the delegate.
104 virtual WebStateDelegate* GetDelegate() = 0; 105 virtual WebStateDelegate* GetDelegate() = 0;
105 virtual void SetDelegate(WebStateDelegate* delegate) = 0; 106 virtual void SetDelegate(WebStateDelegate* delegate) = 0;
106 107
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 276
276 // Returns a WeakPtr<WebState> to the current WebState. Must remain private 277 // Returns a WeakPtr<WebState> to the current WebState. Must remain private
277 // and only call must be in WebStateWeakPtrFactory. Please consult that class 278 // and only call must be in WebStateWeakPtrFactory. Please consult that class
278 // for more details. Remove as part of http://crbug.com/556736. 279 // for more details. Remove as part of http://crbug.com/556736.
279 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; 280 virtual base::WeakPtr<WebState> AsWeakPtr() = 0;
280 }; 281 };
281 282
282 } // namespace web 283 } // namespace web
283 284
284 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ 285 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/web_state/web_state_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698