@scott...@google.com PTAL, thanks! Decided not to force animate the exit fullscreen here since for sad tab the animation does look a bit weird (https://screencast.googleplex.com/cast/NjI5MTM4MDc5NTA4MDcwNHxiYzU4OWIwNC1mZg and https://screencast.googleplex.com/cast/NTE4NTc4NzUxMDM5MDc4NHxlN2M1MzVlOS04Mw to compare). Also, apparently side swipe for iPad also doesn't animate here. So the choice is given to the owner of each ScopedFullscreenDisabler instance just like the original implementation, but defaulting to animated
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM with a couple of notes.
std::unique_ptr<ScopedFullscreenDisabler> _animatedFullscreenDisabler;super nit: You could probably simplify this to just `_fullscreenDisabler`. Also in other classes.
"//ios/chrome/browser/fullscreen/ui_bundled",I was wondering why this was needed, and then I realized that ScopedFullscreenDisabler is still in ui_bundled. It should probably be moved to `ios/chrome/browser/fullscreen/public` or `model`. But that could happen in a separate CL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::unique_ptr<ScopedFullscreenDisabler> _animatedFullscreenDisabler;super nit: You could probably simplify this to just `_fullscreenDisabler`. Also in other classes.
Done
I was wondering why this was needed, and then I realized that ScopedFullscreenDisabler is still in ui_bundled. It should probably be moved to `ios/chrome/browser/fullscreen/public` or `model`. But that could happen in a separate CL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+gambard for owners review outside i/c/b/fullscreen, thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
initWithBaseViewController:self.baseViewControllerYou are updating the baseVC from self.view to self.baseVC. Does it matter?
if (handler_) {You don't need this check I think.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
initWithBaseViewController:self.baseViewControllerYou are updating the baseVC from self.view to self.baseVC. Does it matter?
ah, this was unintentional, changed it back. but actually the FullscreenCoordinator doesn't use the view controller rn and I do not think it'll need to. I'll update its constructor to just accept the browser in a follow-up
You don't need this check I think.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
10 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: ios/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm
Insertions: 4, Deletions: 3.
@@ -1315,7 +1315,7 @@
// them to use it (e.g., BubblePresenterCoordinator and SideSwipeCoordinator).
if (IsFullscreenRefactoringEnabled()) {
_fullscreenCoordinator = [[FullscreenCoordinator alloc]
- initWithBaseViewController:self.baseViewController
+ initWithBaseViewController:self.viewController
browser:browser];
[_fullscreenCoordinator start];
}
@@ -1491,6 +1491,9 @@
[_sideSwipeCoordinator stop];
_sideSwipeCoordinator = nil;
+ [_fullscreenCoordinator stop];
+ _fullscreenCoordinator = nil;
+
[_toolbarCoordinator stop];
_toolbarCoordinator = nil;
_omniboxCommandsHandler = nil;
@@ -1861,8 +1864,6 @@
[self dismissDockingPromo];
[self hideWelcomeBackPromo];
[self hideComposeboxImmediately:YES completion:nil];
- [_fullscreenCoordinator stop];
- _fullscreenCoordinator = nil;
}
// Starts independent mediators owned by this coordinator.
```
```
The name of the file: ios/chrome/browser/fullscreen/ui_bundled/scoped_fullscreen_disabler.mm
Insertions: 1, Deletions: 3.
@@ -24,9 +24,7 @@
if (controller_) {
controller_->DecrementDisabledCounter();
}
- if (handler_) {
- [handler_ reenableFullscreen];
- }
+ [handler_ reenableFullscreen];
}
void ScopedFullscreenDisabler::FullscreenControllerWillShutDown(
```
```
The name of the file: ios/chrome/browser/location_bar/badge/coordinator/location_bar_badge_coordinator.mm
Insertions: 0, Deletions: 1.
@@ -14,7 +14,6 @@
#import "ios/chrome/browser/fullscreen/ui_bundled/animated_scoped_fullscreen_disabler.h"
#import "ios/chrome/browser/fullscreen/ui_bundled/fullscreen_ui_updater.h"
#import "ios/chrome/browser/fullscreen/ui_bundled/scoped_fullscreen_disabler.h"
-#import "ios/chrome/browser/intelligence/bwg/model/bwg_service_factory.h"
#import "ios/chrome/browser/intelligence/bwg/model/gemini_service_factory.h"
#import "ios/chrome/browser/intelligence/bwg/utils/gemini_constants.h"
#import "ios/chrome/browser/location_bar/badge/coordinator/location_bar_badge_coordinator_delegate.h"
```
```
The name of the file: ios/chrome/browser/side_swipe/ui_bundled/side_swipe_ui_controller.mm
Insertions: 0, Deletions: 4.
@@ -69,10 +69,6 @@
// The disabler that prevents the toolbar from being scrolled away when the
// side swipe gesture is being recognized.
std::unique_ptr<ScopedFullscreenDisabler> _fullscreenDisabler;
-
- // The animated disabler displays the toolbar when a side swipe navigation
- // gesture is being recognized.
- std::unique_ptr<ScopedFullscreenDisabler> _fullscreenDisabler;
std::unique_ptr<AnimatedScopedFullscreenDisabler>
_legacyAnimatedFullscreenDisabler;
```
[iOS] Update ScopedFullscreenDisabler and consumers
This CL updates ScopedFullscreenDisabler to use FullscreenCommands and
an animated flag. This will allow for the eventual removal of
AnimatedScopedFullscreenDisabler once the refactor is complete.
More specifically, this CL:
- Updates all consumers of
ScopedFullscreenDisabler/AnimatedScopedFullscreenDisabler to use
the new disabler constructor behind the feature flag.
- Updates FullscreenCommands to support an animated boolean.
- Starts FullscreenCoordinator earlier for handler availability.
- Removes ChromeCoordinator+FullscreenDisabling.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |