Commit c61230ab authored by Eugene But's avatar Eugene But Committed by Commit Bot

Add feature flag for presenting SadTab UI in UIViewController.

Bug: 901563
Change-Id: Ia65425e4d47e79bfae1eb7bcd6f08aa0f4b641d5
Reviewed-on: https://chromium-review.googlesource.com/c/1321573Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606652}
parent 4f8db347
...@@ -135,6 +135,7 @@ source_set("browser") { ...@@ -135,6 +135,7 @@ source_set("browser") {
"//ios/chrome/browser/ui/external_search:feature_flags", "//ios/chrome/browser/ui/external_search:feature_flags",
"//ios/chrome/browser/ui/fullscreen:feature_flags", "//ios/chrome/browser/ui/fullscreen:feature_flags",
"//ios/chrome/browser/ui/omnibox", "//ios/chrome/browser/ui/omnibox",
"//ios/chrome/browser/ui/sad_tab:features",
"//ios/chrome/browser/ui/toolbar/public:feature_flags", "//ios/chrome/browser/ui/toolbar/public:feature_flags",
"//ios/chrome/browser/ui/toolbar_container:feature_flags", "//ios/chrome/browser/ui/toolbar_container:feature_flags",
"//ios/chrome/browser/web:feature_flags", "//ios/chrome/browser/web:feature_flags",
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include "ios/chrome/browser/ssl/captive_portal_features.h" #include "ios/chrome/browser/ssl/captive_portal_features.h"
#include "ios/chrome/browser/ui/external_search/features.h" #include "ios/chrome/browser/ui/external_search/features.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h" #import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
#include "ios/chrome/browser/ui/sad_tab/features.h"
#import "ios/chrome/browser/ui/toolbar/public/features.h" #import "ios/chrome/browser/ui/toolbar/public/features.h"
#import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h" #import "ios/chrome/browser/ui/toolbar_container/toolbar_container_features.h"
#include "ios/chrome/browser/ui/ui_feature_flags.h" #include "ios/chrome/browser/ui/ui_feature_flags.h"
...@@ -384,6 +385,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -384,6 +385,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
{"toolbar-container", flag_descriptions::kToolbarContainerName, {"toolbar-container", flag_descriptions::kToolbarContainerName,
flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos, flag_descriptions::kToolbarContainerDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)}, FEATURE_VALUE_TYPE(toolbar_container::kToolbarContainerEnabled)},
{"present-sad-tab-in-view-controller",
flag_descriptions::kPresentSadTabInViewControllerName,
flag_descriptions::kPresentSadTabInViewControllerDescription,
flags_ui::kOsIos, FEATURE_VALUE_TYPE(kPresentSadTabInViewController)},
{"omnibox-popup-shortcuts", {"omnibox-popup-shortcuts",
flag_descriptions::kOmniboxPopupShortcutIconsInZeroStateName, flag_descriptions::kOmniboxPopupShortcutIconsInZeroStateName,
flag_descriptions::kOmniboxPopupShortcutIconsInZeroStateDescription, flag_descriptions::kOmniboxPopupShortcutIconsInZeroStateDescription,
......
...@@ -286,6 +286,12 @@ const char kToolbarContainerDescription[] = ...@@ -286,6 +286,12 @@ const char kToolbarContainerDescription[] =
"When enabled, the toolbars and their fullscreen animations will be " "When enabled, the toolbars and their fullscreen animations will be "
"managed by the toolbar container coordinator rather than BVC."; "managed by the toolbar container coordinator rather than BVC.";
const char kPresentSadTabInViewControllerName[] =
"Present SadTab in UIViewController";
const char kPresentSadTabInViewControllerDescription[] =
"When enabled, SadTab UI will be presented with UIViewController instead "
"of using WebState::ShowTransientView";
const char kUnifiedConsentName[] = "Unified Consent"; const char kUnifiedConsentName[] = "Unified Consent";
const char kUnifiedConsentDescription[] = const char kUnifiedConsentDescription[] =
"Enables a unified management of user consent for privacy-related " "Enables a unified management of user consent for privacy-related "
......
...@@ -241,6 +241,11 @@ extern const char kSSOWithWKWebViewDescription[]; ...@@ -241,6 +241,11 @@ extern const char kSSOWithWKWebViewDescription[];
extern const char kToolbarContainerName[]; extern const char kToolbarContainerName[];
extern const char kToolbarContainerDescription[]; extern const char kToolbarContainerDescription[];
// Title and description for the flag to use UIViewController for Sad Tab UI
// presentation.
extern const char kPresentSadTabInViewControllerName[];
extern const char kPresentSadTabInViewControllerDescription[];
// Title and description for the flag to enable the unified consent. // Title and description for the flag to enable the unified consent.
extern const char kUnifiedConsentName[]; extern const char kUnifiedConsentName[];
extern const char kUnifiedConsentDescription[]; extern const char kUnifiedConsentDescription[];
......
...@@ -11,6 +11,7 @@ source_set("sad_tab") { ...@@ -11,6 +11,7 @@ source_set("sad_tab") {
"sad_tab_view_controller.mm", "sad_tab_view_controller.mm",
] ]
deps = [ deps = [
":features",
"//base", "//base",
"//components/resources", "//components/resources",
"//components/strings", "//components/strings",
...@@ -30,6 +31,16 @@ source_set("sad_tab") { ...@@ -30,6 +31,16 @@ source_set("sad_tab") {
libs = [ "UIKit.framework" ] libs = [ "UIKit.framework" ]
} }
source_set("features") {
sources = [
"features.cc",
"features.h",
]
deps = [
"//base",
]
}
source_set("coordinator") { source_set("coordinator") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
sources = [ sources = [
......
// 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.
#include "ios/chrome/browser/ui/sad_tab/features.h"
const base::Feature kPresentSadTabInViewController{
"PresentSadTabInViewController", base::FEATURE_DISABLED_BY_DEFAULT};
// 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_SAD_TAB_FEATURES_H_
#define IOS_CHROME_BROWSER_UI_SAD_TAB_FEATURES_H_
#include "base/feature_list.h"
// Feature flag to enable SadTab UI presentation with UIViewController.
extern const base::Feature kPresentSadTabInViewController;
#endif // IOS_CHROME_BROWSER_UI_SAD_TAB_FEATURES_H_
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