Commit ec976900 authored by stkhapugin@chromium.org's avatar stkhapugin@chromium.org Committed by Commit Bot

[UI Refresh] Exit fullscreen when tapping the fullscreen steady locbar.

When the steady location bar is tapped when in scrolled-away state, it
now exits fullscreen first; only the second tap focuses the omnibox.

Bug: 821807
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Iadaed09fa545d4335872f4f5990d6201a2351782
Reviewed-on: https://chromium-review.googlesource.com/1113749Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570353}
parent d9439627
......@@ -265,7 +265,16 @@ const int kLocationAuthorizationStatusCount = 4;
#pragma mark - LocationBarViewControllerDelegate
- (void)locationBarSteadyViewTapped {
[self focusOmnibox];
FullscreenController* fullscreenController =
FullscreenControllerFactory::GetInstance()->GetForBrowserState(
_browserState);
if (fullscreenController->GetProgress() < 1) {
// The first tap should exit fullscreen.
fullscreenController->ResetModel();
} else {
// The toolbar is fully visible, focus the omnibox.
[self focusOmnibox];
}
}
#pragma mark - LocationBarConsumer
......
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