| Index: ios/web/web_state/ui/crw_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
|
| index 9be54a339178bdd4e335334a41159a6f5b187d8e..10d2809008e9f95757e8527fb10072fe0b4f4a43 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller.mm
|
| @@ -458,9 +458,6 @@ @interface CRWWebController ()<CRWContextMenuDelegate,
|
|
|
| // Returns YES if the user interacted with the page recently.
|
| @property(nonatomic, readonly) BOOL userClickedRecently;
|
| -// Returns whether the desktop user agent should be used when setting the user
|
| -// agent.
|
| -@property(nonatomic, readonly) BOOL useDesktopUserAgent;
|
|
|
| // Facade for Mojo API.
|
| @property(nonatomic, readonly) web::MojoFacade* mojoFacade;
|
| @@ -2331,11 +2328,6 @@ - (BOOL)shouldClosePageOnNativeApplicationLoad {
|
| return rendererInitiatedWithoutInteraction || noNavigationItems;
|
| }
|
|
|
| -- (BOOL)useDesktopUserAgent {
|
| - web::NavigationItem* item = [self currentNavItem];
|
| - return item && item->IsOverridingUserAgent();
|
| -}
|
| -
|
| - (web::MojoFacade*)mojoFacade {
|
| if (!_mojoFacade) {
|
| service_manager::mojom::InterfaceProvider* interfaceProvider =
|
| @@ -4204,9 +4196,9 @@ - (void)ensureWebViewCreatedWithConfiguration:(WKWebViewConfiguration*)config {
|
| - (WKWebView*)webViewWithConfiguration:(WKWebViewConfiguration*)config {
|
| // Do not attach the context menu controller immediately as the JavaScript
|
| // delegate must be specified.
|
| - return web::BuildWKWebView(CGRectZero, config,
|
| - self.webStateImpl->GetBrowserState(),
|
| - [self useDesktopUserAgent]);
|
| + return web::BuildWKWebView(
|
| + CGRectZero, config, self.webStateImpl->GetBrowserState(),
|
| + self.navigationManagerImpl->GetUseDesktopUserAgent());
|
| }
|
|
|
| - (void)setWebView:(WKWebView*)webView {
|
|
|