| 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 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 | 1548 |
| 1549 - (void)openAppStore:(NSString*)appId { | 1549 - (void)openAppStore:(NSString*)appId { |
| 1550 [storeKitLauncher_ openAppStore:appId]; | 1550 [storeKitLauncher_ openAppStore:appId]; |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 - (BOOL)usesDesktopUserAgent { | 1553 - (BOOL)usesDesktopUserAgent { |
| 1554 if (!self.navigationManager) | 1554 if (!self.navigationManager) |
| 1555 return NO; | 1555 return NO; |
| 1556 | 1556 |
| 1557 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); | 1557 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); |
| 1558 return visibleItem && visibleItem->IsOverridingUserAgent(); | 1558 return visibleItem && |
| 1559 visibleItem->GetUserAgentType() == web::UserAgentType::DESKTOP; |
| 1559 } | 1560 } |
| 1560 | 1561 |
| 1561 - (void)enableDesktopUserAgent { | 1562 - (void)enableDesktopUserAgent { |
| 1562 DCHECK_EQ(self.usesDesktopUserAgent, NO); | 1563 DCHECK_EQ(self.usesDesktopUserAgent, NO); |
| 1563 DCHECK([self navigationManager]); | 1564 DCHECK([self navigationManager]); |
| 1564 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); | 1565 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); |
| 1565 } | 1566 } |
| 1566 | 1567 |
| 1567 - (void)reloadForDesktopUserAgent { | 1568 - (void)reloadForDesktopUserAgent { |
| 1568 // |loadWithParams| will recreate the removed UIWebView. | 1569 // |loadWithParams| will recreate the removed UIWebView. |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 | 2210 |
| 2210 - (TabModel*)parentTabModel { | 2211 - (TabModel*)parentTabModel { |
| 2211 return parentTabModel_; | 2212 return parentTabModel_; |
| 2212 } | 2213 } |
| 2213 | 2214 |
| 2214 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2215 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2215 return inputAccessoryViewController_.get(); | 2216 return inputAccessoryViewController_.get(); |
| 2216 } | 2217 } |
| 2217 | 2218 |
| 2218 @end | 2219 @end |
| OLD | NEW |