Commit ea0da209 authored by Kurt Horimoto's avatar Kurt Horimoto Committed by Commit Bot

[iOS] Show toolbar when app is foregrounded.

This CL adds a new animator, FullscreenForegroundAnimator that is sent
to FullscreenControllerObservers upon receipt of an application
foreground notification.  This CL also updates FullscreenUIElements
to show the toolbar using this animator.

Bug: 806694
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I9470602d5535964ea0a054c949ccaba0225e5ed3
Reviewed-on: https://chromium-review.googlesource.com/894355
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533198}
parent c6a29b98
......@@ -151,6 +151,7 @@
#import "ios/chrome/browser/ui/fullscreen/fullscreen_controller.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_controller_factory.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_foreground_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_end_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_to_top_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_ui_element.h"
......@@ -4008,6 +4009,14 @@ bubblePresenterForFeature:(const base::Feature&)feature
}];
}
- (void)showToolbarForForgroundWithAnimator:
(FullscreenForegroundAnimator*)animator {
CGFloat finalProgress = animator.finalProgress;
[animator addAnimations:^{
[self updateForFullscreenProgress:finalProgress];
}];
}
#pragma mark - FullscreenUIElement helpers
// Translates the header views up and down according to |progress|, where a
......
......@@ -67,6 +67,8 @@ source_set("new_fullscreen_internal") {
"fullscreen_model.h",
"fullscreen_model.mm",
"fullscreen_model_observer.h",
"fullscreen_system_notification_observer.h",
"fullscreen_system_notification_observer.mm",
"fullscreen_ui_updater.mm",
"fullscreen_web_state_list_observer.h",
"fullscreen_web_state_list_observer.mm",
......@@ -76,8 +78,6 @@ source_set("new_fullscreen_internal") {
"fullscreen_web_view_proxy_observer.mm",
"fullscreen_web_view_scroll_view_replacement_util.h",
"fullscreen_web_view_scroll_view_replacement_util.mm",
"system_notification_fullscreen_disabler.h",
"system_notification_fullscreen_disabler.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
......@@ -100,6 +100,8 @@ source_set("new_fullscreen_ui") {
sources = [
"fullscreen_animator.h",
"fullscreen_animator.mm",
"fullscreen_foreground_animator.h",
"fullscreen_foreground_animator.mm",
"fullscreen_scroll_end_animator.h",
"fullscreen_scroll_end_animator.mm",
"fullscreen_scroll_to_top_animator.h",
......
......@@ -13,7 +13,7 @@
class FullscreenMediator;
class FullscreenModel;
class FullscreenWebStateListObserver;
@class SystemNotificationFullscreenDisabler;
@class FullscreenSystemNotificationObserver;
// Implementation of FullscreenController.
class FullscreenControllerImpl : public FullscreenController {
......@@ -41,12 +41,12 @@ class FullscreenControllerImpl : public FullscreenController {
WebStateList* web_state_list_ = nullptr;
// The model used to calculate fullscreen state.
std::unique_ptr<FullscreenModel> model_;
// The bridge used to forward brodcasted UI to |model_|.
__strong ChromeBroadcastOberverBridge* bridge_ = nil;
// A helper object that disables fullscreen for system notifications.
__strong SystemNotificationFullscreenDisabler* disabler_ = nil;
// Object that manages sending signals to FullscreenControllerImplObservers.
std::unique_ptr<FullscreenMediator> mediator_;
// The bridge used to forward brodcasted UI to |model_|.
__strong ChromeBroadcastOberverBridge* bridge_ = nil;
// A helper object that listens for system notifications.
__strong FullscreenSystemNotificationObserver* notification_observer_ = nil;
// A WebStateListObserver that updates |model_| for WebStateList changes.
std::unique_ptr<FullscreenWebStateListObserver> web_state_list_observer_;
......
......@@ -8,8 +8,8 @@
#import "ios/chrome/browser/ui/broadcaster/chrome_broadcaster.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_mediator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_model.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_system_notification_observer.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.h"
#import "ios/chrome/browser/ui/fullscreen/system_notification_fullscreen_disabler.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -19,11 +19,12 @@ FullscreenControllerImpl::FullscreenControllerImpl()
: FullscreenController(),
broadcaster_([[ChromeBroadcaster alloc] init]),
model_(std::make_unique<FullscreenModel>()),
mediator_(std::make_unique<FullscreenMediator>(this, model_.get())),
bridge_(
[[ChromeBroadcastOberverBridge alloc] initWithObserver:model_.get()]),
disabler_([[SystemNotificationFullscreenDisabler alloc]
initWithController:this]),
mediator_(std::make_unique<FullscreenMediator>(this, model_.get())) {
notification_observer_([[FullscreenSystemNotificationObserver alloc]
initWithController:this
mediator:mediator_.get()]) {
DCHECK(broadcaster_);
[broadcaster_ addObserver:bridge_
forSelector:@selector(broadcastContentScrollOffset:)];
......@@ -76,7 +77,7 @@ void FullscreenControllerImpl::DecrementDisabledCounter() {
void FullscreenControllerImpl::Shutdown() {
mediator_->Disconnect();
[disabler_ disconnect];
[notification_observer_ disconnect];
if (web_state_list_observer_)
web_state_list_observer_->Disconnect();
[broadcaster_ removeObserver:bridge_
......
......@@ -10,6 +10,7 @@
#include "base/macros.h"
class FullscreenController;
@class FullscreenForegroundAnimator;
@class FullscreenScrollEndAnimator;
@class FullscreenScrollToTopAnimator;
......@@ -43,6 +44,13 @@ class FullscreenControllerObserver {
FullscreenController* controller,
FullscreenScrollToTopAnimator* animator) {}
// Invoked when the application is about to enter the foreground.
// FullscreenUIElements are expected to add animations to |animator| to show
// the toolbar.
virtual void FullscreenWillEnterForeground(
FullscreenController* controller,
FullscreenForegroundAnimator* animator) {}
private:
DISALLOW_COPY_AND_ASSIGN(FullscreenControllerObserver);
};
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_FOREGROUND_ANIMATOR_H_
#define IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_FOREGROUND_ANIMATOR_H_
#import "ios/chrome/browser/ui/fullscreen/fullscreen_animator.h"
// When the application is foregrounded, the toolbar is expected to animate into
// view. This animator is used by FullscreenController to coordinate this
// animation.
@interface FullscreenForegroundAnimator : FullscreenAnimator
- (instancetype)initWithStartProgress:(CGFloat)startProgress
NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithStartProgress:(CGFloat)startProgress
duration:(NSTimeInterval)duration NS_UNAVAILABLE;
@end
#endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_FOREGROUND_ANIMATOR_H_
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/fullscreen/fullscreen_foreground_animator.h"
#import "ios/chrome/common/material_timing.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@implementation FullscreenForegroundAnimator
@synthesize finalProgress = _finalProgress;
- (instancetype)initWithStartProgress:(CGFloat)startProgress {
if (self = [super initWithStartProgress:startProgress
duration:ios::material::kDuration1]) {
// The toolbar should be shown when the app is foregrounded.
_finalProgress = 1.0;
}
return self;
}
@end
......@@ -15,6 +15,7 @@
@class FullscreenAnimator;
class FullscreenController;
class FullscreenControllerObserver;
@class FullscreenForegroundAnimator;
@class FullscreenScrollEndAnimator;
@class FullscreenScrollToTopAnimator;
......@@ -36,6 +37,9 @@ class FullscreenMediator : public FullscreenModelObserver {
// Instructs the mediator that a scroll-to-top animation has been triggered.
void ScrollToTop();
// Instructs the mediator that the app will be foregrounded.
void WillEnterForeground();
// Instructs the mediator to stop observing its model.
void Disconnect();
......@@ -71,6 +75,8 @@ class FullscreenMediator : public FullscreenModelObserver {
__strong FullscreenScrollEndAnimator* scroll_end_animator_ = nil;
// The scroll to top animator passed to observers.
__strong FullscreenScrollToTopAnimator* scroll_to_top_animator_ = nil;
// The toolbar reveal animator for foreground events.
__strong FullscreenForegroundAnimator* foreground_animator_ = nil;
// The FullscreenControllerObservers that need to get notified of model
// changes.
base::ObserverList<FullscreenControllerObserver> observers_;
......
......@@ -8,6 +8,7 @@
#include "base/memory/ptr_util.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_controller_observer.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_foreground_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_model.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_end_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_to_top_animator.h"
......@@ -43,6 +44,18 @@ void FullscreenMediator::ScrollToTop() {
[scroll_to_top_animator_ startAnimation];
}
void FullscreenMediator::WillEnterForeground() {
DCHECK(!foreground_animator_);
CGFloat progress = model_->progress();
foreground_animator_ =
[[FullscreenForegroundAnimator alloc] initWithStartProgress:progress];
SetUpAnimator(&foreground_animator_);
for (auto& observer : observers_) {
observer.FullscreenWillEnterForeground(controller_, foreground_animator_);
}
[foreground_animator_ startAnimation];
}
void FullscreenMediator::Disconnect() {
[scroll_end_animator_ stopAnimation:YES];
scroll_end_animator_ = nil;
......@@ -101,7 +114,8 @@ void FullscreenMediator::SetUpAnimator(__strong FullscreenAnimator** animator) {
DCHECK(animator);
DCHECK(*animator);
DCHECK(*animator == scroll_end_animator_ ||
*animator == scroll_to_top_animator_);
*animator == scroll_to_top_animator_ ||
*animator == foreground_animator_);
[*animator addCompletion:^(UIViewAnimatingPosition finalPosition) {
DCHECK_EQ(finalPosition, UIViewAnimatingPositionEnd);
model_->AnimationEndedWithProgress(
......@@ -111,16 +125,22 @@ void FullscreenMediator::SetUpAnimator(__strong FullscreenAnimator** animator) {
}
void FullscreenMediator::StopAnimating(bool update_model) {
if (!scroll_end_animator_ && !scroll_to_top_animator_)
if (!scroll_end_animator_ && !scroll_to_top_animator_ &&
!foreground_animator_) {
return;
}
// At most one animator should be non-nil.
DCHECK(!!scroll_end_animator_ != !!scroll_to_top_animator_);
DCHECK_EQ((scroll_end_animator_ ? 1 : 0) + (scroll_to_top_animator_ ? 1 : 0) +
(foreground_animator_ ? 1 : 0),
1);
if (scroll_end_animator_)
StopAnimator(&scroll_end_animator_, update_model);
if (scroll_to_top_animator_)
StopAnimator(&scroll_to_top_animator_, update_model);
if (foreground_animator_)
StopAnimator(&foreground_animator_, update_model);
}
void FullscreenMediator::StopAnimator(__strong FullscreenAnimator** animator,
......@@ -128,7 +148,8 @@ void FullscreenMediator::StopAnimator(__strong FullscreenAnimator** animator,
DCHECK(animator);
DCHECK(*animator);
DCHECK(*animator == scroll_end_animator_ ||
*animator == scroll_to_top_animator_);
*animator == scroll_to_top_animator_ ||
*animator == foreground_animator_);
DCHECK_EQ((*animator).state, UIViewAnimatingStateActive);
if (update_model)
model_->AnimationEndedWithProgress((*animator).currentProgress);
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_SYSTEM_NOTIFICATION_OBSERVER_H_
#define IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_SYSTEM_NOTIFICATION_OBSERVER_H_
#import <UIKit/UIKit.h>
class FullscreenController;
class FullscreenMediator;
// Helper class that listens for system notifications. This class will disable
// fullscreen when:
// - voice over is enabled
// - the keyboard is visible
// Additionally, this object notifies the mediator of foreground events.
@interface FullscreenSystemNotificationObserver : NSObject
// Designated initializer that updates |controller| and |mediator| for system
// notifications.
- (nullable instancetype)
initWithController:(nonnull FullscreenController*)controller
mediator:(nonnull FullscreenMediator*)mediator
NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)init NS_UNAVAILABLE;
// Stops observing notifications.
- (void)disconnect;
@end
#endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_SYSTEM_NOTIFICATION_OBSERVER_H_
// Copyright 2017 The Chromium Authors. All rights reserved.
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/fullscreen/system_notification_fullscreen_disabler.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_system_notification_observer.h"
#include <memory>
#include "base/logging.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_controller.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_mediator.h"
#import "ios/chrome/browser/ui/fullscreen/scoped_fullscreen_disabler.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface SystemNotificationFullscreenDisabler () {
@interface FullscreenSystemNotificationObserver () {
// The disabler created when VoiceOver is enabled.
std::unique_ptr<ScopedFullscreenDisabler> _voiceOverDisabler;
// The disabler created when the keyboard is visible.
std::unique_ptr<ScopedFullscreenDisabler> _keyboardDisabler;
}
// The FullscreenController being enabled/disabled for VoiceOver.
// The FullscreenController being enabled/disabled for system events.
@property(nonatomic, readonly, nonnull) FullscreenController* controller;
// The FullscreenMediator through which foreground events are propagated to
// FullscreenControllerObservers.
@property(nonatomic, readonly, nonnull) FullscreenMediator* mediator;
// Creates or destroys |_voiceOverDisabler| depending on whether VoiceOver is
// enabled.
- (void)voiceOverStatusChanged;
// Called when the keyboard is shown/hidden to reset |_keyboardDisabler|.
- (void)keyboardWillShow;
- (void)keyboardDidHide;
// Called when the application is foregrounded.
- (void)applicationWillEnterForeground;
@end
@implementation SystemNotificationFullscreenDisabler
@implementation FullscreenSystemNotificationObserver
@synthesize controller = _controller;
@synthesize mediator = _mediator;
- (instancetype)initWithController:(FullscreenController*)controller {
- (instancetype)initWithController:(FullscreenController*)controller
mediator:(FullscreenMediator*)mediator {
if (self = [super init]) {
_controller = controller;
DCHECK(_controller);
_mediator = mediator;
DCHECK(_mediator);
// Register for VoiceOVer status change notifications. The notification
// name has been updated in iOS 11.
NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter];
if (@available(iOS 11, *)) {
[[NSNotificationCenter defaultCenter]
[defaultCenter
addObserver:self
selector:@selector(voiceOverStatusChanged)
name:UIAccessibilityVoiceOverStatusDidChangeNotification
object:nil];
} else {
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(voiceOverStatusChanged)
name:UIAccessibilityVoiceOverStatusChanged
object:nil];
[defaultCenter addObserver:self
selector:@selector(voiceOverStatusChanged)
name:UIAccessibilityVoiceOverStatusChanged
object:nil];
}
// Create a disabler if VoiceOver is enabled.
if (UIAccessibilityIsVoiceOverRunning()) {
_voiceOverDisabler =
std::make_unique<ScopedFullscreenDisabler>(_controller);
}
// Regsiter for keyboard visibility notifications.
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(keyboardWillShow)
name:UIKeyboardWillShowNotification
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(keyboardDidHide)
name:UIKeyboardDidHideNotification
object:nil];
// Register for keyboard visibility notifications.
[defaultCenter addObserver:self
selector:@selector(keyboardWillShow)
name:UIKeyboardWillShowNotification
object:nil];
[defaultCenter addObserver:self
selector:@selector(keyboardDidHide)
name:UIKeyboardDidHideNotification
object:nil];
// Register for application lifecycle events.
[defaultCenter addObserver:self
selector:@selector(applicationWillEnterForeground)
name:UIApplicationWillEnterForegroundNotification
object:nil];
}
return self;
}
......@@ -102,4 +115,8 @@
_keyboardDisabler = nullptr;
}
- (void)applicationWillEnterForeground {
self.mediator->WillEnterForeground();
}
@end
......@@ -7,6 +7,7 @@
#import <Foundation/Foundation.h>
@class FullscreenForegroundAnimator;
@class FullscreenScrollEndAnimator;
@class FullscreenScrollToTopAnimator;
......@@ -34,6 +35,11 @@
- (void)scrollFullscreenToTopWithAnimator:
(FullscreenScrollToTopAnimator*)animator;
// Called when fullscreen detects a foreground event. UI elements that react
// to fullscreen events can configure |animator| with aniamtions.
- (void)showToolbarForForgroundWithAnimator:
(FullscreenForegroundAnimator*)animator;
@end
#endif // IOS_CLEAN_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_UI_ELEMENT_H_
......@@ -28,6 +28,9 @@ class FullscreenUIUpdater : public FullscreenControllerObserver {
void FullscreenWillScrollToTop(
FullscreenController* controller,
FullscreenScrollToTopAnimator* animator) override;
void FullscreenWillEnterForeground(
FullscreenController* controller,
FullscreenForegroundAnimator* animator) override;
// The UI element being updated by this observer.
__weak id<FullscreenUIElement> ui_element_;
......
......@@ -36,3 +36,9 @@ void FullscreenUIUpdater::FullscreenWillScrollToTop(
FullscreenScrollToTopAnimator* animator) {
[ui_element_ scrollFullscreenToTopWithAnimator:animator];
}
void FullscreenUIUpdater::FullscreenWillEnterForeground(
FullscreenController* controller,
FullscreenForegroundAnimator* animator) {
[ui_element_ showToolbarForForgroundWithAnimator:animator];
}
......@@ -5,6 +5,7 @@
#import "ios/chrome/browser/ui/fullscreen/fullscreen_ui_updater.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_foreground_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_end_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_to_top_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_ui_element.h"
......@@ -47,6 +48,11 @@
_animator = animator;
}
- (void)showToolbarForForgroundWithAnimator:
(FullscreenForegroundAnimator*)animator {
_animator = animator;
}
@end
#pragma mark - FullscreenUIUpdaterTest
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_FULLSCREEN_SYSTEM_NOTIFICATION_FULLSCREEN_DISABLER_H_
#define IOS_CHROME_BROWSER_UI_FULLSCREEN_SYSTEM_NOTIFICATION_FULLSCREEN_DISABLER_H_
#import <UIKit/UIKit.h>
class FullscreenController;
// Helper class that handles disabling fullscreen due to NSNotifications sent
// by system frameworks. This class disables fullscreen:
// - when VoiceOver is enabled,
// - when the software keyboard is visible.
@interface SystemNotificationFullscreenDisabler : NSObject
// Designated initializer that disables |controller| for system notifications.
- (nullable instancetype)initWithController:
(nonnull FullscreenController*)controller NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)init NS_UNAVAILABLE;
// Stops observing VoiceOver notifications.
- (void)disconnect;
@end
#endif // IOS_CHROME_BROWSER_UI_FULLSCREEN_SYSTEM_NOTIFICATION_FULLSCREEN_DISABLER_H_
......@@ -6,6 +6,7 @@
#import "base/logging.h"
#import "ios/chrome/browser/ui/commands/browser_commands.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_foreground_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_end_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_to_top_animator.h"
#import "ios/chrome/browser/ui/history_popup/requirements/tab_history_constants.h"
......@@ -158,6 +159,11 @@
[self addFullscreenAnimationsToAnimator:animator];
}
- (void)showToolbarForForgroundWithAnimator:
(FullscreenForegroundAnimator*)animator {
[self addFullscreenAnimationsToAnimator:animator];
}
#pragma mark - FullscreenUIElement helpers
- (void)addFullscreenAnimationsToAnimator:(FullscreenAnimator*)animator {
......
......@@ -12,6 +12,7 @@
#import "ios/chrome/browser/ui/commands/history_popup_commands.h"
#import "ios/chrome/browser/ui/commands/start_voice_search_command.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_foreground_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_end_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_to_top_animator.h"
#include "ios/chrome/browser/ui/rtl_geometry.h"
......@@ -583,6 +584,11 @@
[self addFullscreenAnimationsToAnimator:animator];
}
- (void)showToolbarForForgroundWithAnimator:
(FullscreenForegroundAnimator*)animator {
[self addFullscreenAnimationsToAnimator:animator];
}
#pragma mark - FullscreenUIElement helpers
- (void)addFullscreenAnimationsToAnimator:(FullscreenAnimator*)animator {
......
......@@ -216,6 +216,10 @@ initWithDispatcher:
(FullscreenScrollToTopAnimator*)animator {
}
- (void)showToolbarForForgroundWithAnimator:
(FullscreenForegroundAnimator*)animator {
}
#pragma mark - ToolsMenuPresentationProvider
- (UIButton*)presentingButtonForToolsMenuCoordinator:
......
......@@ -19,6 +19,7 @@
#import "ios/chrome/browser/ui/commands/application_commands.h"
#import "ios/chrome/browser/ui/commands/browser_commands.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_foreground_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_end_animator.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_scroll_to_top_animator.h"
#import "ios/chrome/browser/ui/image_util/image_util.h"
......@@ -784,6 +785,11 @@ using ios::material::TimingFunction;
[self addFullscreenAnimationsToAnimator:animator];
}
- (void)showToolbarForForgroundWithAnimator:
(FullscreenForegroundAnimator*)animator {
[self addFullscreenAnimationsToAnimator:animator];
}
#pragma mark - FullscreenUIElement helpers
- (void)addFullscreenAnimationsToAnimator:(FullscreenAnimator*)animator {
......
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