| Index: ios/web/public/navigation_manager.h
|
| diff --git a/ios/web/public/navigation_manager.h b/ios/web/public/navigation_manager.h
|
| index 876cee6d046edfbfb4518308d233dd4bf9c4b8d0..3d8a52be3dcc1e9ec93e0eb24bb035b85450182e 100644
|
| --- a/ios/web/public/navigation_manager.h
|
| +++ b/ios/web/public/navigation_manager.h
|
| @@ -30,6 +30,20 @@ class WebState;
|
| // exactly one NavigationManager.
|
| class NavigationManager {
|
| public:
|
| + // User agent override option used in LoadURLParams.
|
| + enum class UserAgentOverrideOption : short {
|
| + // Inherit the user agent type from the last committed non-native item if
|
| + // there is one, otherwise keep the default type, which is NONE for native
|
| + // item and MOBILE for non-native item.
|
| + INHERIT = 0,
|
| +
|
| + // Use the mobile user agent.
|
| + MOBILE,
|
| +
|
| + // Use the desktop user agent.
|
| + DESKTOP,
|
| + };
|
| +
|
| // Parameters for URL loading. Most parameters are optional, and can be left
|
| // at the default values set by the constructor.
|
| struct WebLoadParams {
|
| @@ -43,6 +57,9 @@ class NavigationManager {
|
| // The transition type for the load. Defaults to PAGE_TRANSITION_LINK.
|
| ui::PageTransition transition_type;
|
|
|
| + // The user agent override option for the load. Defualts to INHERIT.
|
| + UserAgentOverrideOption user_agent_override_option;
|
| +
|
| // True for renderer-initiated navigations. This is
|
| // important for tracking whether to display pending URLs.
|
| bool is_renderer_initiated;
|
| @@ -179,12 +196,6 @@ class NavigationManager {
|
| // - There is no pending history navigation.
|
| // - There is no transient NavigationItem.
|
| virtual bool CanPruneAllButLastCommittedItem() const = 0;
|
| -
|
| - // Forces the pending item to be loaded using desktop user agent. Note that
|
| - // the pending item may or may not already exist.
|
| - // TODO(crbug.com/692303): Remove this when overriding the user agent doesn't
|
| - // create a new NavigationItem.
|
| - virtual void OverrideDesktopUserAgentForNextPendingItem() = 0;
|
| };
|
|
|
| } // namespace web
|
|
|