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

Unified Diff: ios/web/navigation/navigation_manager_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/navigation/navigation_manager_impl.h
diff --git a/ios/web/navigation/navigation_manager_impl.h b/ios/web/navigation/navigation_manager_impl.h
index ef09e5205d991ceaf33001fdb9bf2da2b2eb4ee6..2386be23628e661f45d805c78aa9072b8d6e1fd0 100644
--- a/ios/web/navigation/navigation_manager_impl.h
+++ b/ios/web/navigation/navigation_manager_impl.h
@@ -23,15 +23,19 @@ class NavigationItem;
struct Referrer;
class NavigationManagerDelegate;
class NavigationManagerFacadeDelegate;
+class SerializedNavigationManagerBuilder;
// Implementation of NavigationManager.
// Generally mirrors upstream's NavigationController.
class NavigationManagerImpl : public NavigationManager {
public:
- NavigationManagerImpl(NavigationManagerDelegate* delegate,
- BrowserState* browser_state);
+ NavigationManagerImpl();
~NavigationManagerImpl() override;
+ // Setters for NavigationManagerDelegate and BrowserState.
+ void SetDelegate(NavigationManagerDelegate* delegate);
+ void SetBrowserState(BrowserState* browser_state);
+
// Sets the CRWSessionController that backs this object.
// Keeps a strong reference to |session_controller|.
// This method should only be called when deserializing |session_controller|
@@ -58,6 +62,10 @@ class NavigationManagerImpl : public NavigationManager {
void ReplaceSessionHistory(ScopedVector<NavigationItem> items,
int current_index);
+ // Returns a copy of the NavigationManager for use in serialization. Does not
Eugene But (OOO till 7-30) 2015/09/23 16:33:44 Deep copy or shallow copy?
kkhorimoto 2015/09/24 18:12:59 Deep. I've added a comment.
+ // copy |delegate_| or |facade_delegate_|.
+ scoped_ptr<NavigationManagerImpl> CopyForSerialization() const;
+
// Sets the delegate used to drive the navigation controller facade.
void SetFacadeDelegate(NavigationManagerFacadeDelegate* facade_delegate);
NavigationManagerFacadeDelegate* GetFacadeDelegate() const;
@@ -130,6 +138,8 @@ class NavigationManagerImpl : public NavigationManager {
// CRWSessionController.
void CopyState(NavigationManagerImpl* navigation_manager);
private:
+ friend SerializedNavigationManagerBuilder;
+
// The primary delegate for this manager.
NavigationManagerDelegate* delegate_;

Powered by Google App Engine
This is Rietveld 408576698