Chromium Code Reviews| 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> | 
| 11 #include <vector> | 11 #include <vector> | 
| 12 | 12 | 
| 13 #import "base/mac/scoped_nsobject.h" | 13 #import "base/mac/scoped_nsobject.h" | 
| 14 #include "base/macros.h" | 14 #include "base/macros.h" | 
| 15 #import "ios/web/public/navigation_item_list.h" | 15 #import "ios/web/public/navigation_item_list.h" | 
| 16 #import "ios/web/public/navigation_manager.h" | 16 #import "ios/web/public/navigation_manager.h" | 
| 17 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" | 
| 18 #include "url/gurl.h" | 18 #include "url/gurl.h" | 
| 19 | 19 | 
| 20 @class CRWSessionController; | 20 @class CRWSessionController; | 
| 21 | 21 | 
| 22 namespace web { | 22 namespace web { | 
| 23 class BrowserState; | 23 class BrowserState; | 
| 24 class NavigationItem; | 24 class NavigationItem; | 
| 25 struct Referrer; | 25 struct Referrer; | 
| 26 class NavigationManagerDelegate; | 26 class NavigationManagerDelegate; | 
| 27 class NavigationManagerFacadeDelegate; | 27 class NavigationManagerFacadeDelegate; | 
| 28 class SessionStorageBuilder; | 28 class SessionStorageBuilder; | 
| 29 enum class ReloadType : short; | |
| 
 
kkhorimoto
2017/03/10 21:26:45
optional nit: Generally for public web// interface
 
liaoyuke
2017/03/10 21:42:34
Done. For consistency.
 
 | |
| 29 | 30 | 
| 30 // Defines the ways how a pending navigation can be initiated. | 31 // Defines the ways how a pending navigation can be initiated. | 
| 31 enum class NavigationInitiationType { | 32 enum class NavigationInitiationType { | 
| 32 // Navigation initiation type is only valid for pending navigations, use NONE | 33 // Navigation initiation type is only valid for pending navigations, use NONE | 
| 33 // if a navigation is already committed. | 34 // if a navigation is already committed. | 
| 34 NONE = 0, | 35 NONE = 0, | 
| 35 | 36 | 
| 36 // Navigation was initiated by actual user action. | 37 // Navigation was initiated by actual user action. | 
| 37 USER_INITIATED, | 38 USER_INITIATED, | 
| 38 | 39 | 
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 int GetCurrentItemIndex() const override; | 134 int GetCurrentItemIndex() const override; | 
| 134 int GetPendingItemIndex() const override; | 135 int GetPendingItemIndex() const override; | 
| 135 int GetLastCommittedItemIndex() const override; | 136 int GetLastCommittedItemIndex() const override; | 
| 136 bool RemoveItemAtIndex(int index) override; | 137 bool RemoveItemAtIndex(int index) override; | 
| 137 bool CanGoBack() const override; | 138 bool CanGoBack() const override; | 
| 138 bool CanGoForward() const override; | 139 bool CanGoForward() const override; | 
| 139 bool CanGoToOffset(int offset) const override; | 140 bool CanGoToOffset(int offset) const override; | 
| 140 void GoBack() override; | 141 void GoBack() override; | 
| 141 void GoForward() override; | 142 void GoForward() override; | 
| 142 void GoToIndex(int index) override; | 143 void GoToIndex(int index) override; | 
| 143 void Reload(bool check_for_reposts) override; | 144 void Reload(ReloadType reload_type, bool check_for_reposts) override; | 
| 144 void OverrideDesktopUserAgentForNextPendingItem() override; | 145 void OverrideDesktopUserAgentForNextPendingItem() override; | 
| 145 | 146 | 
| 146 // Returns the current list of transient url rewriters, passing ownership to | 147 // Returns the current list of transient url rewriters, passing ownership to | 
| 147 // the caller. | 148 // the caller. | 
| 148 // TODO(crbug.com/546197): remove once NavigationItem creation occurs in this | 149 // TODO(crbug.com/546197): remove once NavigationItem creation occurs in this | 
| 149 // class. | 150 // class. | 
| 150 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 151 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 
| 151 GetTransientURLRewriters(); | 152 GetTransientURLRewriters(); | 
| 152 | 153 | 
| 153 // Called to reset the transient url rewriter list. | 154 // Called to reset the transient url rewriter list. | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 196 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 
| 196 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 197 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 
| 197 transient_url_rewriters_; | 198 transient_url_rewriters_; | 
| 198 | 199 | 
| 199 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 200 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 
| 200 }; | 201 }; | 
| 201 | 202 | 
| 202 } // namespace web | 203 } // namespace web | 
| 203 | 204 | 
| 204 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 205 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 
| OLD | NEW |