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

Unified Diff: ios/web/web_state/ui/crw_web_controller_container_view.mm

Issue 2589213002: Add CRWNativeContent willBeDismissed. (Closed)
Patch Set: feedback Created 4 years 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/public/web_state/ui/crw_native_content.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller_container_view.mm
diff --git a/ios/web/web_state/ui/crw_web_controller_container_view.mm b/ios/web/web_state/ui/crw_web_controller_container_view.mm
index 25e31bdead7566ca9822665fe69d06cb203c3764..87e1363cd2070adcec77179444157a5e65e01167 100644
--- a/ios/web/web_state/ui/crw_web_controller_container_view.mm
+++ b/ios/web/web_state/ui/crw_web_controller_container_view.mm
@@ -172,6 +172,9 @@
- (void)setNativeController:(id<CRWNativeContent>)nativeController {
if (![_nativeController isEqual:nativeController]) {
base::WeakNSProtocol<id> oldController(_nativeController);
+ if ([oldController respondsToSelector:@selector(willBeDismissed)]) {
+ [oldController willBeDismissed];
+ }
[[oldController view] removeFromSuperview];
_nativeController.reset([nativeController retain]);
// TODO(crbug.com/503297): Re-enable this DCHECK once native controller
« no previous file with comments | « ios/web/public/web_state/ui/crw_native_content.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698