| 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_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |    5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 
|    6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |    6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 
|    7  |    7  | 
|    8 #include <stddef.h> |    8 #include <stddef.h> | 
|    9  |    9  | 
|   10 #include <memory> |   10 #include <memory> | 
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  125   virtual int GetIndexForOffset(int offset) const = 0; |  125   virtual int GetIndexForOffset(int offset) const = 0; | 
|  126  |  126  | 
|  127   // Returns the index of the previous item. Only used by SessionStorageBuilder. |  127   // Returns the index of the previous item. Only used by SessionStorageBuilder. | 
|  128   virtual int GetPreviousItemIndex() const = 0; |  128   virtual int GetPreviousItemIndex() const = 0; | 
|  129  |  129  | 
|  130  protected: |  130  protected: | 
|  131   // The SessionStorageBuilder functions require access to private variables of |  131   // The SessionStorageBuilder functions require access to private variables of | 
|  132   // NavigationManagerImpl. |  132   // NavigationManagerImpl. | 
|  133   friend SessionStorageBuilder; |  133   friend SessionStorageBuilder; | 
|  134  |  134  | 
 |  135   // TODO(crbug.com/738020): Remove legacy code and merge | 
 |  136   // WKBasedNavigationManager into this class after the navigation experiment. | 
 |  137  | 
|  135   // Identical to GetItemAtIndex() but returns the underlying NavigationItemImpl |  138   // Identical to GetItemAtIndex() but returns the underlying NavigationItemImpl | 
|  136   // instead of the public NavigationItem interface. This is used by |  139   // instead of the public NavigationItem interface. This is used by | 
|  137   // SessionStorageBuilder to persist session state. |  140   // SessionStorageBuilder to persist session state. | 
|  138   virtual NavigationItemImpl* GetNavigationItemImplAtIndex( |  141   virtual NavigationItemImpl* GetNavigationItemImplAtIndex( | 
|  139       size_t index) const = 0; |  142       size_t index) const = 0; | 
 |  143  | 
 |  144   // Checks whether or not two URL are an in-page navigation (differing only | 
 |  145   // in the fragment). | 
 |  146   static bool AreUrlsFragmentChangeNavigation(const GURL& existing_url, | 
 |  147                                               const GURL& new_url); | 
|  140 }; |  148 }; | 
|  141  |  149  | 
|  142 }  // namespace web |  150 }  // namespace web | 
|  143  |  151  | 
|  144 #endif  // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |  152 #endif  // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 
| OLD | NEW |