| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |