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

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: Created 5 years, 3 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
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 9c4cfb6148d1d6d652d41f8d5b16c76bce402ac8..3e6c8f47b7cc52983cc76b4050b237e73a374474 100644
--- a/ios/web/web_state/web_state_impl.h
+++ b/ios/web/web_state/web_state_impl.h
@@ -55,7 +55,12 @@ 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 or copied
+ // NavigationManagerImpls.
+ WebStateImpl(BrowserState* browser_State,
Eugene But (OOO till 7-30) 2015/09/23 16:33:44 s/browser_State/browser_state/
kkhorimoto 2015/09/24 18:12:59 Done.
+ scoped_ptr<NavigationManagerImpl> navigation_manager);
~WebStateImpl() override;
// Sets the CRWWebController that backs this object. Typically
@@ -74,7 +79,7 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
// TODO(marq): Revisit this function and the ownership model described above;
// too this depends on and interacts directly with above-the-web-level
// information.
- WebStateImpl* CopyForSessionWindow();
+ scoped_ptr<WebStateImpl> CopyForSerialization() const;
// Notifies the observers that a provisional navigation has started.
void OnProvisionalNavigationStarted(const GURL& url);
@@ -279,7 +284,8 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
// The CRWWebController that backs and owns this object.
CRWWebController* web_controller_;
- NavigationManagerImpl navigation_manager_;
+ // The NavigationManagerImpl that stores session info for this WebStateImpl.
+ scoped_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.

Powered by Google App Engine
This is Rietveld 408576698