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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2787593002: [ios] Clean up uses of private web API. (Closed)
Patch Set: Address comments (add TODO). 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/tabs/tab_unittest.mm ('k') | ios/chrome/browser/ui/browser_view_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index e85bb3beacd577f3d26cf0f582015f4383625cbf..e4b9c0f71612ce81e846a255da2c38298bebc590 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -1944,7 +1944,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
[_toolbarController dismissToolsMenuPopup];
[self hidePageInfoPopupForView:nil];
[_toolbarController dismissTabHistoryPopup];
- [[_model currentTab].webController recordStateInHistory];
+ [[_model currentTab] recordStateInHistory];
}
#pragma mark - Tap handling
@@ -2894,7 +2894,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
case OverscrollAction::REFRESH: {
if ([[[_model currentTab] webController] loadPhase] ==
web::PAGE_LOADING) {
- [[_model currentTab] stopLoading];
+ [_model currentTab].webState->Stop();
}
web::WebState* webState = [_model currentTab].webState;
@@ -3722,7 +3722,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
params.transition_type = transition;
params.is_renderer_initiated = rendererInitiated;
DCHECK([_model currentTab]);
- [[[_model currentTab] webController] loadWithParams:params];
+ [[_model currentTab] navigationManager]->LoadURLWithParams(params);
}
- (void)loadJavaScriptFromLocationBar:(NSString*)script {
@@ -4050,7 +4050,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
break;
}
case IDC_STOP:
- [[_model currentTab] stopLoading];
+ [_model currentTab].webState->Stop();
break;
#if !defined(NDEBUG)
case IDC_VIEW_SOURCE:
@@ -4340,7 +4340,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
Tab* tab = [_model currentTab];
web::NavigationManager::WebLoadParams params(URL);
params.transition_type = ui::PAGE_TRANSITION_AUTO_BOOKMARK;
- [[tab webController] loadWithParams:params];
+ [tab navigationManager]->LoadURLWithParams(params);
}
- (void)showReadingList {
@@ -4383,7 +4383,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
Tab* tab = [_model currentTab];
web::NavigationManager::WebLoadParams params(url);
params.transition_type = ui::PAGE_TRANSITION_AUTO_BOOKMARK;
- [[tab webController] loadWithParams:params];
+ [tab navigationManager]->LoadURLWithParams(params);
}
- (void)showRateThisAppDialog {
« no previous file with comments | « ios/chrome/browser/tabs/tab_unittest.mm ('k') | ios/chrome/browser/ui/browser_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698