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

Unified Diff: ios/web/web_state/web_state_impl.h

Issue 1360993002: Moved NavigationManagerImpl serialization out of CRWSessionController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compilation fix after rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/web_state/web_state.h ('k') | ios/web/web_state/web_state_impl.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_state_impl.h
diff --git a/ios/web/web_state/web_state_impl.h b/ios/web/web_state/web_state_impl.h
index 2e6d0d379ab421079ff7e3b12fec6cebadd05623..5fb1dc2062898425d38fa5a09db2ad9a5a17c4cc 100644
--- a/ios/web/web_state/web_state_impl.h
+++ b/ios/web/web_state/web_state_impl.h
@@ -25,6 +25,7 @@
#import "ios/web/public/web_state/web_state_delegate.h"
#include "url/gurl.h"
+@class CRWNavigationManagerStorage;
@class CRWWebController;
@protocol CRWWebViewProxy;
@class NSURLRequest;
@@ -62,7 +63,11 @@ class WebUIIOS;
// writing them out for session saves.
class WebStateImpl : public WebState, public NavigationManagerDelegate {
public:
+ // Constructor for WebStateImpls created for new sessions.
WebStateImpl(BrowserState* browser_state);
+ // Constructor for WebStatesImpls created for deserialized sessions
+ WebStateImpl(BrowserState* browser_state,
+ CRWNavigationManagerStorage* session_storage);
~WebStateImpl() override;
// Gets/Sets the CRWWebController that backs this object.
@@ -73,13 +78,6 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
WebStateFacadeDelegate* GetFacadeDelegate() const;
void SetFacadeDelegate(WebStateFacadeDelegate* facade_delegate);
- // Returns a WebStateImpl that doesn't have a browser context, web
- // controller, or facade set, but which otherwise has the same state variables
- // as the calling object (including copies of the NavigationManager and its
- // attendant CRWSessionController).
- // TODO(crbug.com/546377): Clean up this method.
- WebStateImpl* CopyForSessionWindow();
-
// Notifies the observers that a provisional navigation has started.
void OnProvisionalNavigationStarted(const GURL& url);
@@ -206,6 +204,7 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
void Stop() override;
const NavigationManager* GetNavigationManager() const override;
NavigationManager* GetNavigationManager() override;
+ CRWNavigationManagerStorage* BuildSerializedNavigationManager() override;
CRWJSInjectionReceiver* GetJSInjectionReceiver() const override;
void ExecuteJavaScript(const base::string16& javascript) override;
void ExecuteJavaScript(const base::string16& javascript,
@@ -309,7 +308,8 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
// The CRWWebController that backs this object.
base::scoped_nsobject<CRWWebController> web_controller_;
- NavigationManagerImpl navigation_manager_;
+ // The NavigationManagerImpl that stores session info for this WebStateImpl.
+ std::unique_ptr<NavigationManagerImpl> navigation_manager_;
// |web::WebUIIOS| object for the current page if it is a WebUI page that
// uses the web-based WebUI framework, or nullptr otherwise.
« no previous file with comments | « ios/web/public/web_state/web_state.h ('k') | ios/web/web_state/web_state_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698