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/web/web_state/ui/crw_web_controller.h" | 5 #import "ios/web/web_state/ui/crw_web_controller.h" |
6 | 6 |
7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/ios/block_types.h" | 10 #include "base/ios/block_types.h" |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 // However the delegate is not immediately called. | 1371 // However the delegate is not immediately called. |
1372 [self registerLoadRequest:targetURL | 1372 [self registerLoadRequest:targetURL |
1373 referrer:referrer | 1373 referrer:referrer |
1374 transition:[self currentTransition]]; | 1374 transition:[self currentTransition]]; |
1375 [self loadRequest:request]; | 1375 [self loadRequest:request]; |
1376 } | 1376 } |
1377 | 1377 |
1378 - (void)loadNativeViewWithSuccess:(BOOL)loadSuccess { | 1378 - (void)loadNativeViewWithSuccess:(BOOL)loadSuccess { |
1379 [_nativeController view].frame = [self visibleFrame]; | 1379 [_nativeController view].frame = [self visibleFrame]; |
1380 [_containerView addSubview:[_nativeController view]]; | 1380 [_containerView addSubview:[_nativeController view]]; |
| 1381 [[_nativeController view] setNeedsUpdateConstraints]; |
1381 const GURL currentURL([self currentURL]); | 1382 const GURL currentURL([self currentURL]); |
1382 [self didStartLoadingURL:currentURL updateHistory:loadSuccess]; | 1383 [self didStartLoadingURL:currentURL updateHistory:loadSuccess]; |
1383 _loadPhase = web::PAGE_LOADED; | 1384 _loadPhase = web::PAGE_LOADED; |
1384 | 1385 |
1385 // Perform post-load-finished updates. | 1386 // Perform post-load-finished updates. |
1386 [self didFinishWithURL:currentURL loadSuccess:loadSuccess]; | 1387 [self didFinishWithURL:currentURL loadSuccess:loadSuccess]; |
1387 | 1388 |
1388 // Inform the embedder the title changed. | 1389 // Inform the embedder the title changed. |
1389 if ([_delegate respondsToSelector:@selector(webController:titleDidChange:)]) { | 1390 if ([_delegate respondsToSelector:@selector(webController:titleDidChange:)]) { |
1390 NSString* title = [_nativeController title]; | 1391 NSString* title = [_nativeController title]; |
(...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3683 if (!_externalRequest || !_externalRequest->window_name) | 3684 if (!_externalRequest || !_externalRequest->window_name) |
3684 return @""; | 3685 return @""; |
3685 return _externalRequest->window_name; | 3686 return _externalRequest->window_name; |
3686 } | 3687 } |
3687 | 3688 |
3688 - (void)resetExternalRequest { | 3689 - (void)resetExternalRequest { |
3689 _externalRequest.reset(); | 3690 _externalRequest.reset(); |
3690 } | 3691 } |
3691 | 3692 |
3692 @end | 3693 @end |
OLD | NEW |