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

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

Issue 2811073005: Replace requirePageReconstruction with setCustomUserAgent (Closed)
Patch Set: Remove unncessary if condition and add comments Created 3 years, 8 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
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_web_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 - (BOOL)usesDesktopUserAgent { 1361 - (BOOL)usesDesktopUserAgent {
1362 if (!self.navigationManager) 1362 if (!self.navigationManager)
1363 return NO; 1363 return NO;
1364 1364
1365 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); 1365 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem();
1366 return visibleItem && 1366 return visibleItem &&
1367 visibleItem->GetUserAgentType() == web::UserAgentType::DESKTOP; 1367 visibleItem->GetUserAgentType() == web::UserAgentType::DESKTOP;
1368 } 1368 }
1369 1369
1370 - (void)reloadWithUserAgentType:(web::UserAgentType)userAgentType { 1370 - (void)reloadWithUserAgentType:(web::UserAgentType)userAgentType {
1371 // This removes the web view, which will be recreated at the end of this.
1372 [self.webController requirePageReconstruction];
1373
1374 // TODO(crbug.com/228171): A hack in session_controller -addPendingItem 1371 // TODO(crbug.com/228171): A hack in session_controller -addPendingItem
1375 // discusses making tab responsible for distinguishing history stack 1372 // discusses making tab responsible for distinguishing history stack
1376 // navigation from new navigations. 1373 // navigation from new navigations.
1377 web::NavigationManager* navigationManager = [self navigationManager]; 1374 web::NavigationManager* navigationManager = [self navigationManager];
1378 DCHECK(navigationManager); 1375 DCHECK(navigationManager);
1379 1376
1380 web::NavigationItem* lastNonRedirectItem = 1377 web::NavigationItem* lastNonRedirectItem =
1381 navigationManager->GetTransientItem(); 1378 navigationManager->GetTransientItem();
1382 if (!lastNonRedirectItem || IsItemRedirectItem(lastNonRedirectItem)) 1379 if (!lastNonRedirectItem || IsItemRedirectItem(lastNonRedirectItem))
1383 lastNonRedirectItem = navigationManager->GetVisibleItem(); 1380 lastNonRedirectItem = navigationManager->GetVisibleItem();
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 1982
1986 - (TabModel*)parentTabModel { 1983 - (TabModel*)parentTabModel {
1987 return parentTabModel_; 1984 return parentTabModel_;
1988 } 1985 }
1989 1986
1990 - (FormInputAccessoryViewController*)inputAccessoryViewController { 1987 - (FormInputAccessoryViewController*)inputAccessoryViewController {
1991 return inputAccessoryViewController_.get(); 1988 return inputAccessoryViewController_.get();
1992 } 1989 }
1993 1990
1994 @end 1991 @end
OLDNEW
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_web_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698