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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 int GetPendingItemIndex() const override; | 136 int GetPendingItemIndex() const override; |
137 int GetLastCommittedItemIndex() const override; | 137 int GetLastCommittedItemIndex() const override; |
138 bool RemoveItemAtIndex(int index) override; | 138 bool RemoveItemAtIndex(int index) override; |
139 bool CanGoBack() const override; | 139 bool CanGoBack() const override; |
140 bool CanGoForward() const override; | 140 bool CanGoForward() const override; |
141 bool CanGoToOffset(int offset) const override; | 141 bool CanGoToOffset(int offset) const override; |
142 void GoBack() override; | 142 void GoBack() override; |
143 void GoForward() override; | 143 void GoForward() override; |
144 void GoToIndex(int index) override; | 144 void GoToIndex(int index) override; |
145 void Reload(bool check_for_reposts) override; | 145 void Reload(bool check_for_reposts) override; |
146 void OverrideDesktopUserAgentForNextPendingItem() override; | 146 |
147 // Whether or not desktop user agent is used for the currently loaded page. | |
148 // Returns true, if use a desktop user agent and false for a mobile one. | |
149 bool GetUseDesktopUserAgent() const; | |
kkhorimoto
2017/02/22 01:08:40
This is similarly confusingly named. Howe about "
liaoyuke
2017/02/22 01:37:43
Given that Android uses this name, do we still wan
kkhorimoto
2017/02/22 01:54:33
Yes, I think we should change it.
| |
150 | |
151 // Forces the pending item to be loaded using desktop user agent. Note that | |
152 // the pending item may or may not already exist. | |
153 // TODO(crbug.com/692303): Remove this when overriding the user agent doesn't | |
154 // create a new NavigationItem. | |
155 void OverrideDesktopUserAgentForNextPendingItem(); | |
kkhorimoto
2017/02/22 01:08:40
Since these functions are called by Tab (i.e. in t
liaoyuke
2017/02/22 01:37:43
Got it. Thank you for explaining.
| |
147 | 156 |
148 // Returns the current list of transient url rewriters, passing ownership to | 157 // Returns the current list of transient url rewriters, passing ownership to |
149 // the caller. | 158 // the caller. |
150 // TODO(crbug.com/546197): remove once NavigationItem creation occurs in this | 159 // TODO(crbug.com/546197): remove once NavigationItem creation occurs in this |
151 // class. | 160 // class. |
152 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 161 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
153 GetTransientURLRewriters(); | 162 GetTransientURLRewriters(); |
154 | 163 |
155 // Called to reset the transient url rewriter list. | 164 // Called to reset the transient url rewriter list. |
156 void RemoveTransientURLRewriters(); | 165 void RemoveTransientURLRewriters(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 206 // List of transient url rewriters added by |AddTransientURLRewriter()|. |
198 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 207 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
199 transient_url_rewriters_; | 208 transient_url_rewriters_; |
200 | 209 |
201 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 210 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); |
202 }; | 211 }; |
203 | 212 |
204 } // namespace web | 213 } // namespace web |
205 | 214 |
206 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 215 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
OLD | NEW |