| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #import "ios/chrome/browser/tabs/tab.h" | 5 #import "ios/chrome/browser/tabs/tab.h" |
| 6 | 6 |
| 7 #import <CoreLocation/CoreLocation.h> | 7 #import <CoreLocation/CoreLocation.h> |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 | 1582 |
| 1583 - (void)openAppStore:(NSString*)appId { | 1583 - (void)openAppStore:(NSString*)appId { |
| 1584 [storeKitLauncher_ openAppStore:appId]; | 1584 [storeKitLauncher_ openAppStore:appId]; |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 - (BOOL)usesDesktopUserAgent { | 1587 - (BOOL)usesDesktopUserAgent { |
| 1588 if (!self.navigationManager) | 1588 if (!self.navigationManager) |
| 1589 return NO; | 1589 return NO; |
| 1590 | 1590 |
| 1591 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); | 1591 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); |
| 1592 return visibleItem && visibleItem->IsOverridingUserAgent(); | 1592 return visibleItem && |
| 1593 visibleItem->GetUserAgentType() == web::UserAgentType::DESKTOP; |
| 1593 } | 1594 } |
| 1594 | 1595 |
| 1595 - (void)enableDesktopUserAgent { | 1596 - (void)enableDesktopUserAgent { |
| 1596 DCHECK_EQ(self.usesDesktopUserAgent, NO); | 1597 DCHECK_EQ(self.usesDesktopUserAgent, NO); |
| 1597 DCHECK([self navigationManager]); | 1598 DCHECK([self navigationManager]); |
| 1598 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); | 1599 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); |
| 1599 } | 1600 } |
| 1600 | 1601 |
| 1601 - (void)reloadForDesktopUserAgent { | 1602 - (void)reloadForDesktopUserAgent { |
| 1602 // |loadWithParams| will recreate the removed UIWebView. | 1603 // |loadWithParams| will recreate the removed UIWebView. |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 | 2248 |
| 2248 - (TabModel*)parentTabModel { | 2249 - (TabModel*)parentTabModel { |
| 2249 return parentTabModel_; | 2250 return parentTabModel_; |
| 2250 } | 2251 } |
| 2251 | 2252 |
| 2252 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2253 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2253 return inputAccessoryViewController_.get(); | 2254 return inputAccessoryViewController_.get(); |
| 2254 } | 2255 } |
| 2255 | 2256 |
| 2256 @end | 2257 @end |
| OLD | NEW |