Chromium Code Reviews| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 #import "ios/chrome/browser/ui/fullscreen_controller.h" | 98 #import "ios/chrome/browser/ui/fullscreen_controller.h" |
| 99 #import "ios/chrome/browser/ui/open_in_controller.h" | 99 #import "ios/chrome/browser/ui/open_in_controller.h" |
| 100 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller. h" | 100 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller. h" |
| 101 #import "ios/chrome/browser/ui/prerender_delegate.h" | 101 #import "ios/chrome/browser/ui/prerender_delegate.h" |
| 102 #import "ios/chrome/browser/ui/reader_mode/reader_mode_checker.h" | 102 #import "ios/chrome/browser/ui/reader_mode/reader_mode_checker.h" |
| 103 #import "ios/chrome/browser/ui/reader_mode/reader_mode_controller.h" | 103 #import "ios/chrome/browser/ui/reader_mode/reader_mode_controller.h" |
| 104 #import "ios/chrome/browser/ui/sad_tab/sad_tab_view.h" | 104 #import "ios/chrome/browser/ui/sad_tab/sad_tab_view.h" |
| 105 #include "ios/chrome/browser/ui/ui_util.h" | 105 #include "ios/chrome/browser/ui/ui_util.h" |
| 106 #import "ios/chrome/browser/web/auto_reload_bridge.h" | 106 #import "ios/chrome/browser/web/auto_reload_bridge.h" |
| 107 #import "ios/chrome/browser/web/external_app_launcher.h" | 107 #import "ios/chrome/browser/web/external_app_launcher.h" |
| 108 #include "ios/chrome/browser/web/navigation_manager_util.h" | |
|
Eugene But (OOO till 7-30)
2017/03/17 14:32:04
s/include/import
pkl (ping after 24h if needed)
2017/03/17 20:23:52
Done.
| |
| 108 #import "ios/chrome/browser/web/passkit_dialog_provider.h" | 109 #import "ios/chrome/browser/web/passkit_dialog_provider.h" |
| 109 #include "ios/chrome/browser/web/print_observer.h" | 110 #include "ios/chrome/browser/web/print_observer.h" |
| 110 #import "ios/chrome/browser/xcallback_parameters.h" | 111 #import "ios/chrome/browser/xcallback_parameters.h" |
| 111 #include "ios/chrome/grit/ios_strings.h" | 112 #include "ios/chrome/grit/ios_strings.h" |
| 112 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 113 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| 113 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_metad ata.h" | 114 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_metad ata.h" |
| 114 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_white list_manager.h" | 115 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_white list_manager.h" |
| 115 #import "ios/web/navigation/crw_session_controller.h" | 116 #import "ios/web/navigation/crw_session_controller.h" |
| 116 #import "ios/web/navigation/navigation_item_impl.h" | 117 #import "ios/web/navigation/navigation_item_impl.h" |
| 117 #import "ios/web/navigation/navigation_manager_impl.h" | 118 #import "ios/web/navigation/navigation_manager_impl.h" |
| (...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1501 [self.webController requirePageReconstruction]; | 1502 [self.webController requirePageReconstruction]; |
| 1502 | 1503 |
| 1503 // TODO(crbug.com/228171): A hack in session_controller -addPendingItem | 1504 // TODO(crbug.com/228171): A hack in session_controller -addPendingItem |
| 1504 // discusses making tab responsible for distinguishing history stack | 1505 // discusses making tab responsible for distinguishing history stack |
| 1505 // navigation from new navigations. Because we want a new navigation here, we | 1506 // navigation from new navigations. Because we want a new navigation here, we |
| 1506 // use |PAGE_TRANSITION_FORM_SUBMIT|. When session_controller changes, so | 1507 // use |PAGE_TRANSITION_FORM_SUBMIT|. When session_controller changes, so |
| 1507 // should this. | 1508 // should this. |
| 1508 ui::PageTransition transition = | 1509 ui::PageTransition transition = |
| 1509 ui::PageTransitionFromInt(ui::PAGE_TRANSITION_FORM_SUBMIT); | 1510 ui::PageTransitionFromInt(ui::PAGE_TRANSITION_FORM_SUBMIT); |
| 1510 DCHECK([self navigationManager]); | 1511 DCHECK([self navigationManager]); |
| 1511 CRWSessionController* sessionController = | 1512 web::NavigationItem* lastUserItem = |
|
Eugene But (OOO till 7-30)
2017/03/17 14:32:04
nit: s/lastUserItem/lastNonRedirectedItem ?
pkl (ping after 24h if needed)
2017/03/17 20:23:52
Done.
| |
| 1512 [self navigationManagerImpl]->GetSessionController(); | 1513 GetLastNonRedirectedItem([self navigationManager]); |
| 1513 web::NavigationItem* lastUserItem = [sessionController lastUserItem]; | |
| 1514 if (!lastUserItem) | 1514 if (!lastUserItem) |
| 1515 return; | 1515 return; |
| 1516 | 1516 |
| 1517 // |originalUrl| will be empty if a page was open by DOM. | 1517 // |originalUrl| will be empty if a page was open by DOM. |
| 1518 GURL reloadURL(lastUserItem->GetOriginalRequestURL()); | 1518 GURL reloadURL(lastUserItem->GetOriginalRequestURL()); |
| 1519 if (reloadURL.is_empty()) { | 1519 if (reloadURL.is_empty()) { |
| 1520 DCHECK(sessionController.openedByDOM); | 1520 DCHECK( |
| 1521 [[self navigationManagerImpl]->GetSessionController() isOpenedByDOM]); | |
| 1521 reloadURL = lastUserItem->GetVirtualURL(); | 1522 reloadURL = lastUserItem->GetVirtualURL(); |
| 1522 } | 1523 } |
| 1523 | 1524 |
| 1524 web::NavigationManager::WebLoadParams params(reloadURL); | 1525 web::NavigationManager::WebLoadParams params(reloadURL); |
| 1525 params.referrer = lastUserItem->GetReferrer(); | 1526 params.referrer = lastUserItem->GetReferrer(); |
| 1526 params.transition_type = transition; | 1527 params.transition_type = transition; |
| 1527 if (self.navigationManager) | 1528 if (self.navigationManager) |
| 1528 self.navigationManager->LoadURLWithParams(params); | 1529 self.navigationManager->LoadURLWithParams(params); |
| 1529 } | 1530 } |
| 1530 | 1531 |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2104 | 2105 |
| 2105 - (TabModel*)parentTabModel { | 2106 - (TabModel*)parentTabModel { |
| 2106 return parentTabModel_; | 2107 return parentTabModel_; |
| 2107 } | 2108 } |
| 2108 | 2109 |
| 2109 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2110 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2110 return inputAccessoryViewController_.get(); | 2111 return inputAccessoryViewController_.get(); |
| 2111 } | 2112 } |
| 2112 | 2113 |
| 2113 @end | 2114 @end |
| OLD | NEW |