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 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 | 1560 |
1561 - (void)openAppStore:(NSString*)appId { | 1561 - (void)openAppStore:(NSString*)appId { |
1562 [storeKitLauncher_ openAppStore:appId]; | 1562 [storeKitLauncher_ openAppStore:appId]; |
1563 } | 1563 } |
1564 | 1564 |
1565 - (BOOL)usesDesktopUserAgent { | 1565 - (BOOL)usesDesktopUserAgent { |
1566 if (!self.navigationManager) | 1566 if (!self.navigationManager) |
1567 return NO; | 1567 return NO; |
1568 | 1568 |
1569 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); | 1569 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); |
1570 return visibleItem && visibleItem->IsOverridingUserAgent(); | 1570 return visibleItem && |
| 1571 visibleItem->GetUserAgentType() == web::UserAgentType::DESKTOP; |
1571 } | 1572 } |
1572 | 1573 |
1573 - (void)enableDesktopUserAgent { | 1574 - (void)enableDesktopUserAgent { |
1574 DCHECK_EQ(self.usesDesktopUserAgent, NO); | 1575 DCHECK_EQ(self.usesDesktopUserAgent, NO); |
1575 DCHECK([self navigationManager]); | 1576 DCHECK([self navigationManager]); |
1576 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); | 1577 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); |
1577 } | 1578 } |
1578 | 1579 |
1579 - (void)reloadForDesktopUserAgent { | 1580 - (void)reloadForDesktopUserAgent { |
1580 // |loadWithParams| will recreate the removed UIWebView. | 1581 // |loadWithParams| will recreate the removed UIWebView. |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2232 | 2233 |
2233 - (TabModel*)parentTabModel { | 2234 - (TabModel*)parentTabModel { |
2234 return parentTabModel_; | 2235 return parentTabModel_; |
2235 } | 2236 } |
2236 | 2237 |
2237 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2238 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
2238 return inputAccessoryViewController_.get(); | 2239 return inputAccessoryViewController_.get(); |
2239 } | 2240 } |
2240 | 2241 |
2241 @end | 2242 @end |
OLD | NEW |