| 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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 - (BOOL)usesDesktopUserAgent { | 1370 - (BOOL)usesDesktopUserAgent { |
| 1371 if (!self.navigationManager) | 1371 if (!self.navigationManager) |
| 1372 return NO; | 1372 return NO; |
| 1373 | 1373 |
| 1374 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); | 1374 web::NavigationItem* visibleItem = self.navigationManager->GetVisibleItem(); |
| 1375 return visibleItem && | 1375 return visibleItem && |
| 1376 visibleItem->GetUserAgentType() == web::UserAgentType::DESKTOP; | 1376 visibleItem->GetUserAgentType() == web::UserAgentType::DESKTOP; |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 - (void)reloadWithUserAgentType:(web::UserAgentType)userAgentType { | 1379 - (void)reloadWithUserAgentType:(web::UserAgentType)userAgentType { |
| 1380 // This removes the web view, which will be recreated at the end of this. | |
| 1381 [self.webController requirePageReconstruction]; | |
| 1382 | |
| 1383 // TODO(crbug.com/228171): A hack in session_controller -addPendingItem | 1380 // TODO(crbug.com/228171): A hack in session_controller -addPendingItem |
| 1384 // discusses making tab responsible for distinguishing history stack | 1381 // discusses making tab responsible for distinguishing history stack |
| 1385 // navigation from new navigations. | 1382 // navigation from new navigations. |
| 1386 web::NavigationManager* navigationManager = [self navigationManager]; | 1383 web::NavigationManager* navigationManager = [self navigationManager]; |
| 1387 DCHECK(navigationManager); | 1384 DCHECK(navigationManager); |
| 1388 | 1385 |
| 1389 web::NavigationItem* lastNonRedirectItem = | 1386 web::NavigationItem* lastNonRedirectItem = |
| 1390 navigationManager->GetTransientItem(); | 1387 navigationManager->GetTransientItem(); |
| 1391 if (!lastNonRedirectItem || IsItemRedirectItem(lastNonRedirectItem)) | 1388 if (!lastNonRedirectItem || IsItemRedirectItem(lastNonRedirectItem)) |
| 1392 lastNonRedirectItem = navigationManager->GetVisibleItem(); | 1389 lastNonRedirectItem = navigationManager->GetVisibleItem(); |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1983 | 1980 |
| 1984 - (TabModel*)parentTabModel { | 1981 - (TabModel*)parentTabModel { |
| 1985 return parentTabModel_; | 1982 return parentTabModel_; |
| 1986 } | 1983 } |
| 1987 | 1984 |
| 1988 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 1985 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 1989 return inputAccessoryViewController_.get(); | 1986 return inputAccessoryViewController_.get(); |
| 1990 } | 1987 } |
| 1991 | 1988 |
| 1992 @end | 1989 @end |
| OLD | NEW |