Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Side by Side Diff: ios/chrome/browser/tabs/tab.mm

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: Eugene's comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698