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

[iOS] Add new feature flag and helper for popup presentation.

Adds new feature flag, kRefreshPopupPresentation, for UI refresh omnibox
popup presentation.

Bug: 821817
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ib4ed4f181e49849d5c5858b2457e14553f8d60af
Reviewed-on: https://chromium-review.googlesource.com/973308
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545039}
parent e33ce4df
......@@ -4,6 +4,9 @@
#include "ios/chrome/browser/ui/ui_feature_flags.h"
const base::Feature kRefreshPopupPresentation{
"UIRefreshPopupPresentation", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kUIRefreshPhase1{"UIRefreshPhase1",
base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -7,6 +7,11 @@
#include "base/feature_list.h"
// Used to enable the UI Refresh omnibox popup presentation. This flag should
// not be used directly. Instead use
// ui_util::IsRefreshPopupPresentationEnabled().
extern const base::Feature kRefreshPopupPresentation;
// Used to enable the first phase of the UI refresh. This flag should not be
// used directly. Instead use ui_util::IsUIRefreshPhase1Enabled().
extern const base::Feature kUIRefreshPhase1;
......
......@@ -39,6 +39,9 @@ CGFloat CurrentScreenWidth();
// Returns true if the device is an iPhone X.
bool IsIPhoneX();
// Returns whether the UI Refresh Omnibox Popup presentation will be used.
bool IsRefreshPopupPresentationEnabled();
// Returns whether the first phase of the UI refresh will be displayed.
bool IsUIRefreshPhase1Enabled();
......
......@@ -57,6 +57,10 @@ bool IsIPhoneX() {
CGRectGetHeight([[UIScreen mainScreen] nativeBounds]) == 2436);
}
bool IsRefreshPopupPresentationEnabled() {
return base::FeatureList::IsEnabled(kRefreshPopupPresentation);
}
bool IsUIRefreshPhase1Enabled() {
if (tests_hook::ForceUIRefreshPhase1())
return true;
......
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