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

Unified Diff: ios/chrome/browser/ui/contextual_search/contextual_search_results_view.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
Index: ios/chrome/browser/ui/contextual_search/contextual_search_results_view.mm
diff --git a/ios/chrome/browser/ui/contextual_search/contextual_search_results_view.mm b/ios/chrome/browser/ui/contextual_search/contextual_search_results_view.mm
index f0e220f4620392bd22b3aa93822c29e803b2aedb..0cd9cf36cf5ed0709321f4663cb408bedad8c8a4 100644
--- a/ios/chrome/browser/ui/contextual_search/contextual_search_results_view.mm
+++ b/ios/chrome/browser/ui/contextual_search/contextual_search_results_view.mm
@@ -119,7 +119,8 @@ enum SearchResultsViewVisibility { OFFSCREEN, PRELOAD, VISIBLE };
Tab* tab = LegacyTabHelper::GetTabForWebState(_webState.get());
// Start watching the embedded Tab's web activity.
_webStateObserver->ObserveWebState(_webState.get());
- [[tab webController] setShouldSuppressDialogs:NO];
+ _webState->SetShouldSuppressDialogs(false);
+
_webViewProxy.reset([[[tab webController] webViewProxy] retain]);
[[_webViewProxy scrollViewProxy] setBounces:NO];
}
@@ -155,12 +156,12 @@ enum SearchResultsViewVisibility { OFFSCREEN, PRELOAD, VISIBLE };
DCHECK(tab);
[[tab webController] setNativeProvider:self];
- [[tab webController] setWebUsageEnabled:YES];
+ _webState->SetWebUsageEnabled(true);
[tab setIsLinkLoadingPrerenderTab:YES];
web::NavigationManager::WebLoadParams loadParams(url);
loadParams.transition_type = ui::PAGE_TRANSITION_FROM_ADDRESS_BAR;
- [[tab webController] loadWithParams:loadParams];
+ _webState->GetNavigationManager()->LoadURLWithParams(loadParams);
// Don't actually start the page load yet -- that happens in -loadTab
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller_unittest.mm ('k') | ios/chrome/browser/ui/preload_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698