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

Side by Side Diff: ios/web/shell/view_controller.mm

Issue 2665423002: Update web shell app to not load dev.chromium.org on launch. (Closed)
Patch Set: remove chrome code Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_earl_grey.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/web/shell/view_controller.h" 5 #import "ios/web/shell/view_controller.h"
6 6
7 #import <MobileCoreServices/MobileCoreServices.h> 7 #import <MobileCoreServices/MobileCoreServices.h>
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 _webState->SetWebUsageEnabled(true); 129 _webState->SetWebUsageEnabled(true);
130 130
131 _webStateObserver.reset( 131 _webStateObserver.reset(
132 new web::WebStateObserverBridge(_webState.get(), self)); 132 new web::WebStateObserverBridge(_webState.get(), self));
133 _webStateDelegate.reset(new web::WebStateDelegateBridge(self)); 133 _webStateDelegate.reset(new web::WebStateDelegateBridge(self));
134 _webState->SetDelegate(_webStateDelegate.get()); 134 _webState->SetDelegate(_webStateDelegate.get());
135 135
136 UIView* view = _webState->GetView(); 136 UIView* view = _webState->GetView();
137 [view setFrame:[_containerView bounds]]; 137 [view setFrame:[_containerView bounds]];
138 [_containerView addSubview:view]; 138 [_containerView addSubview:view];
139
140 NavigationManager::WebLoadParams params(GURL("https://dev.chromium.org/"));
141 params.transition_type = ui::PAGE_TRANSITION_TYPED;
142 self.navigationManager->LoadURLWithParams(params);
143 } 139 }
144 140
145 - (NavigationManager*)navigationManager { 141 - (NavigationManager*)navigationManager {
146 return _webState->GetNavigationManager(); 142 return _webState->GetNavigationManager();
147 } 143 }
148 144
149 - (web::WebState*)webState { 145 - (web::WebState*)webState {
150 return _webState.get(); 146 return _webState.get();
151 } 147 }
152 148
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" 298 [alert addAction:[UIAlertAction actionWithTitle:@"Cancel"
303 style:UIAlertActionStyleCancel 299 style:UIAlertActionStyleCancel
304 handler:nil]]; 300 handler:nil]];
305 301
306 [self presentViewController:alert animated:YES completion:nil]; 302 [self presentViewController:alert animated:YES completion:nil];
307 303
308 return YES; 304 return YES;
309 } 305 }
310 306
311 @end 307 @end
OLDNEW
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_earl_grey.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698