Commit cd960d5a authored by mrefaat's avatar mrefaat Committed by Commit Bot

Fix a bug where open in doesn't show loading view

It seems like with the switch to the new tab grid, this feature stopped
to function properly. it used to use the rootview controller to present
dialogs & views. using the base view for now to present the loading
screen as a quick fix. The whole class should be refactored in the future
to get a base view controller instead.

Bug: 892839
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I4eea25b3d3c5c329dd54865de1fbae68e05304e1
Reviewed-on: https://chromium-review.googlesource.com/c/1266205Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597515}
parent 1891acd4
......@@ -463,10 +463,7 @@ class OpenInControllerBridge
}
- (void)showDownloadOverlayView {
UIViewController* topViewController =
[[[UIApplication sharedApplication] keyWindow] rootViewController];
UIView* topView = topViewController.view;
overlayedView_ = [[UIView alloc] initWithFrame:[topView bounds]];
overlayedView_ = [[UIView alloc] initWithFrame:[self.baseView bounds]];
[overlayedView_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight)];
UIView* grayBackgroundView =
......@@ -515,9 +512,8 @@ class OpenInControllerBridge
action:@selector(handleTapOnOverlayedView:)];
[tapRecognizer setDelegate:self];
[overlayedView_ addGestureRecognizer:tapRecognizer];
[overlayedView_ setAlpha:0.0];
[topView addSubview:overlayedView_];
[self.baseView addSubview:overlayedView_];
UIView* overlayedView = overlayedView_;
[UIView animateWithDuration:kOverlayViewAnimationDuration
animations:^{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment