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

Unified Diff: ios/web/shell/view_controller.mm

Issue 1836793002: [ios] Moved WebLoadParams inside NavigationManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/web/shell/DEPS ('k') | ios/web/web_state/ui/crw_web_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/shell/view_controller.mm
diff --git a/ios/web/shell/view_controller.mm b/ios/web/shell/view_controller.mm
index 9460538d30b0f6dbc32e0e9e2536ba8c21631673..5be7cebe5858a00ad10a5d0cc01852bb45ae192c 100644
--- a/ios/web/shell/view_controller.mm
+++ b/ios/web/shell/view_controller.mm
@@ -16,7 +16,6 @@
#import "ios/net/crn_http_protocol_handler.h"
#import "ios/net/empty_nsurlcache.h"
#import "ios/web/navigation/crw_session_controller.h"
-#include "ios/web/navigation/web_load_params.h"
#import "ios/web/net/crw_url_verifying_protocol_handler.h"
#include "ios/web/net/request_tracker_factory_impl.h"
#import "ios/web/net/web_http_protocol_handler_delegate.h"
@@ -32,6 +31,8 @@ NSString* const kWebShellBackButtonAccessibilityLabel = @"Back";
NSString* const kWebShellForwardButtonAccessibilityLabel = @"Forward";
NSString* const kWebShellAddressFieldAccessibilityLabel = @"Address field";
+using web::NavigationManager;
+
@interface ViewController ()<CRWWebUserInterfaceDelegate> {
web::BrowserState* _browserState;
base::scoped_nsobject<CRWWebController> _webController;
@@ -123,7 +124,7 @@ NSString* const kWebShellAddressFieldAccessibilityLabel = @"Address field";
[view setFrame:[_containerView bounds]];
[_containerView addSubview:view];
- web::WebLoadParams params(GURL("https://dev.chromium.org/"));
+ NavigationManager::WebLoadParams params(GURL("https://dev.chromium.org/"));
params.transition_type = ui::PAGE_TRANSITION_TYPED;
[_webController loadWithParams:params];
}
@@ -165,25 +166,25 @@ NSString* const kWebShellAddressFieldAccessibilityLabel = @"Address field";
}
- (void)back {
- web::NavigationManager* navManager = self.webState->GetNavigationManager();
+ NavigationManager* navManager = self.webState->GetNavigationManager();
if (navManager->CanGoBack()) {
navManager->GoBack();
}
}
- (void)forward {
- web::NavigationManager* navManager = self.webState->GetNavigationManager();
+ NavigationManager* navManager = self.webState->GetNavigationManager();
if (navManager->CanGoForward()) {
navManager->GoForward();
}
}
- (BOOL)textFieldShouldReturn:(UITextField*)field {
- GURL url = GURL(base::SysNSStringToUTF8([field text]));
+ GURL URL = GURL(base::SysNSStringToUTF8([field text]));
// Do not try to load invalid URLs.
- if (url.is_valid()) {
- web::WebLoadParams params(url);
+ if (URL.is_valid()) {
+ NavigationManager::WebLoadParams params(URL);
params.transition_type = ui::PAGE_TRANSITION_TYPED;
[_webController loadWithParams:params];
}
@@ -337,9 +338,11 @@ NSString* const kWebShellAddressFieldAccessibilityLabel = @"Address field";
}
- (void)webWillReload {
}
-- (void)webWillInitiateLoadWithParams:(web::WebLoadParams&)params {
+- (void)webWillInitiateLoadWithParams:
+ (NavigationManager::WebLoadParams&)params {
}
-- (void)webDidUpdateSessionForLoadWithParams:(const web::WebLoadParams&)params
+- (void)webDidUpdateSessionForLoadWithParams:
+ (const NavigationManager::WebLoadParams&)params
wasInitialNavigation:(BOOL)initialNavigation {
}
- (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry {
« no previous file with comments | « ios/web/shell/DEPS ('k') | ios/web/web_state/ui/crw_web_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698