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

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

Issue 2711683002: (Set)IsOverridingUserAgent should be called on VisibleItem (Closed)
Patch Set: Addressed feedback Created 3 years, 10 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 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 [self.readerModeController exitReaderMode]; 1561 [self.readerModeController exitReaderMode];
1562 } 1562 }
1563 1563
1564 #pragma mark - 1564 #pragma mark -
1565 1565
1566 - (void)openAppStore:(NSString*)appId { 1566 - (void)openAppStore:(NSString*)appId {
1567 [storeKitLauncher_ openAppStore:appId]; 1567 [storeKitLauncher_ openAppStore:appId];
1568 } 1568 }
1569 1569
1570 - (BOOL)useDesktopUserAgent { 1570 - (BOOL)useDesktopUserAgent {
1571 web::NavigationItem* currentItem = self.currentNavigationItem; 1571 return [self navigationManager]->GetUseDesktopUserAgent();
1572 return currentItem && currentItem->IsOverridingUserAgent();
1573 } 1572 }
1574 1573
1575 - (void)enableDesktopUserAgent { 1574 - (void)enableDesktopUserAgent {
1576 DCHECK_EQ(self.useDesktopUserAgent, NO); 1575 DCHECK_EQ(self.useDesktopUserAgent, NO);
1577 DCHECK([self navigationManager]); 1576 DCHECK([self navigationManager]);
1578 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem(); 1577 [self navigationManager]->OverrideDesktopUserAgentForNextPendingItem();
1579 } 1578 }
1580 1579
1581 - (void)reloadForDesktopUserAgent { 1580 - (void)reloadForDesktopUserAgent {
1582 // |loadWithParams| will recreate the removed UIWebView. 1581 // |loadWithParams| will recreate the removed UIWebView.
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 2222
2224 - (TabModel*)parentTabModel { 2223 - (TabModel*)parentTabModel {
2225 return parentTabModel_; 2224 return parentTabModel_;
2226 } 2225 }
2227 2226
2228 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2227 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2229 return inputAccessoryViewController_.get(); 2228 return inputAccessoryViewController_.get();
2230 } 2229 }
2231 2230
2232 @end 2231 @end
OLDNEW
« no previous file with comments | « no previous file | ios/web/navigation/crw_session_controller.mm » ('j') | ios/web/navigation/navigation_manager_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698