Chromium Code Reviews| 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 bfcc3f987101de631b9de34ac04db4e97a7df7ee..47a576ceeee7b59b82084a502dcb54a9e826abbd 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; |
| @@ -2339,11 +2336,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 = |
| @@ -4210,11 +4202,17 @@ - (void)ensureWebViewCreatedWithConfiguration:(WKWebViewConfiguration*)config { |
| } |
| - (WKWebView*)webViewWithConfiguration:(WKWebViewConfiguration*)config { |
| + web::NavigationItem* visibleItem = |
|
Eugene But (OOO till 7-30)
2017/02/23 00:54:24
Is there a reason for removing |useDesktopUserAgen
liaoyuke
2017/02/23 01:10:14
Done.
kkhorimoto
2017/02/23 01:16:25
I suggested removing the old property because of t
|
| + self.navigationManagerImpl ? self.navigationManagerImpl->GetVisibleItem() |
| + : nil; |
| + BOOL isUsingDesktopUseragent = |
|
Eugene But (OOO till 7-30)
2017/02/23 00:54:24
shouldUseDesktopUserAgent
Agent capitalized, |is|
liaoyuke
2017/02/23 01:10:14
Acknowledged.
|
| + visibleItem && visibleItem->IsOverridingUserAgent(); |
| + |
| // 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]); |
| + isUsingDesktopUseragent); |
| } |
| - (void)setWebView:(WKWebView*)webView { |