Commit db9e6a96 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Creates Recent Tabs UI Reboot Feature flag.

Bug: 805013
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I0b9ed58466af7b0c7ea092d8210683ba510502d4
Reviewed-on: https://chromium-review.googlesource.com/916808
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536917}
parent 7df9529c
...@@ -125,6 +125,7 @@ source_set("browser") { ...@@ -125,6 +125,7 @@ source_set("browser") {
"//ios/chrome/browser/ui/external_search:features", "//ios/chrome/browser/ui/external_search:features",
"//ios/chrome/browser/ui/history:history_base_feature", "//ios/chrome/browser/ui/history:history_base_feature",
"//ios/chrome/browser/ui/main:feature_flags", "//ios/chrome/browser/ui/main:feature_flags",
"//ios/chrome/browser/ui/ntp/recent_tabs:base_feature",
"//ios/chrome/browser/ui/omnibox", "//ios/chrome/browser/ui/omnibox",
"//ios/chrome/browser/ui/toolbar/public:toolbar_base_feature", "//ios/chrome/browser/ui/toolbar/public:toolbar_base_feature",
"//ios/chrome/common", "//ios/chrome/common",
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "ios/chrome/browser/ui/external_search/features.h" #include "ios/chrome/browser/ui/external_search/features.h"
#import "ios/chrome/browser/ui/history/history_base_feature.h" #import "ios/chrome/browser/ui/history/history_base_feature.h"
#include "ios/chrome/browser/ui/main/main_feature_flags.h" #include "ios/chrome/browser/ui/main/main_feature_flags.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_feature.h"
#import "ios/chrome/browser/ui/omnibox/omnibox_clipping_feature.h" #import "ios/chrome/browser/ui/omnibox/omnibox_clipping_feature.h"
#import "ios/chrome/browser/ui/toolbar/public/toolbar_controller_base_feature.h" #import "ios/chrome/browser/ui/toolbar/public/toolbar_controller_base_feature.h"
#include "ios/chrome/browser/ui/ui_feature_flags.h" #include "ios/chrome/browser/ui/ui_feature_flags.h"
...@@ -224,6 +225,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -224,6 +225,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
{"ui-refresh-phase-1", flag_descriptions::kUIRefreshPhase1Name, {"ui-refresh-phase-1", flag_descriptions::kUIRefreshPhase1Name,
flag_descriptions::kUIRefreshPhase1Description, flags_ui::kOsIos, flag_descriptions::kUIRefreshPhase1Description, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kUIRefreshPhase1)}, FEATURE_VALUE_TYPE(kUIRefreshPhase1)},
{"recent-tabs-ui-reboot", flag_descriptions::kRecentTabsUIRebootName,
flag_descriptions::kRecentTabsUIRebootDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kRecentTabsUIReboot)},
{"context-menu-element-post-message", {"context-menu-element-post-message",
flag_descriptions::kContextMenuElementPostMessageName, flag_descriptions::kContextMenuElementPostMessageName,
flag_descriptions::kContextMenuElementPostMessageDescription, flag_descriptions::kContextMenuElementPostMessageDescription,
......
...@@ -54,6 +54,9 @@ bool IsNewFeedbackKitEnabled(); ...@@ -54,6 +54,9 @@ bool IsNewFeedbackKitEnabled();
// Whether the 3rd party keyboard omnibox workaround is enabled. // Whether the 3rd party keyboard omnibox workaround is enabled.
bool IsThirdPartyKeyboardWorkaroundEnabled(); bool IsThirdPartyKeyboardWorkaroundEnabled();
// Whether RecentTabs UI Reboot is enabled.
bool IsRecentTabsUIRebootEnabled();
// Whether the application group sandbox must be cleared before starting. // Whether the application group sandbox must be cleared before starting.
// Calling this method will reset the flag to false, so the sandbox is cleared // Calling this method will reset the flag to false, so the sandbox is cleared
// only once. // only once.
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "components/signin/core/browser/signin_switches.h" #include "components/signin/core/browser/signin_switches.h"
#include "components/variations/variations_associated_data.h" #include "components/variations/variations_associated_data.h"
#include "ios/chrome/browser/chrome_switches.h" #include "ios/chrome/browser/chrome_switches.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_feature.h"
#include "ios/web/public/web_view_creation_util.h" #include "ios/web/public/web_view_creation_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
...@@ -125,4 +126,8 @@ bool IsThirdPartyKeyboardWorkaroundEnabled() { ...@@ -125,4 +126,8 @@ bool IsThirdPartyKeyboardWorkaroundEnabled() {
return base::FeatureList::IsEnabled(kEnableThirdPartyKeyboardWorkaround); return base::FeatureList::IsEnabled(kEnableThirdPartyKeyboardWorkaround);
} }
bool IsRecentTabsUIRebootEnabled() {
return base::FeatureList::IsEnabled(kRecentTabsUIReboot);
}
} // namespace experimental_flags } // namespace experimental_flags
...@@ -96,6 +96,10 @@ const char kPhysicalWebDescription[] = ...@@ -96,6 +96,10 @@ const char kPhysicalWebDescription[] =
"When enabled, the omnibox will include suggestions for web pages " "When enabled, the omnibox will include suggestions for web pages "
"broadcast by devices near you."; "broadcast by devices near you.";
const char kRecentTabsUIRebootName[] = "Recent Tabs UI Reboot";
const char kRecentTabsUIRebootDescription[] =
"When enabled, Recent Tabs will use the new UI Reboot stack.";
const char kShareCanonicalURLName[] = "Share Canonical URL"; const char kShareCanonicalURLName[] = "Share Canonical URL";
const char kShareCanonicalURLDescription[] = const char kShareCanonicalURLDescription[] =
"When enabled, the current page's canonical URL is shared (if it exists) " "When enabled, the current page's canonical URL is shared (if it exists) "
......
...@@ -83,6 +83,11 @@ extern const char kPasswordExportDescription[]; ...@@ -83,6 +83,11 @@ extern const char kPasswordExportDescription[];
extern const char kPhysicalWeb[]; extern const char kPhysicalWeb[];
extern const char kPhysicalWebDescription[]; extern const char kPhysicalWebDescription[];
// Title and description for the flag to enable the new UI Reboot on Recent
// Tabs.
extern const char kRecentTabsUIRebootName[];
extern const char kRecentTabsUIRebootDescription[];
// Title and description for the flag to share the canonical URL of the // Title and description for the flag to share the canonical URL of the
// current page instead of the visible URL. // current page instead of the visible URL.
extern const char kShareCanonicalURLName[]; extern const char kShareCanonicalURLName[];
......
...@@ -58,6 +58,17 @@ source_set("recent_tabs") { ...@@ -58,6 +58,17 @@ source_set("recent_tabs") {
libs = [ "UIKit.framework" ] libs = [ "UIKit.framework" ]
} }
source_set("base_feature") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"recent_tabs_feature.h",
"recent_tabs_feature.mm",
]
deps = [
"//base",
]
}
source_set("unit_tests") { source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
testonly = true testonly = true
......
// 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_NTP_RECENT_TABS_RECENT_TABS_FEATURE_H_
#define IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_FEATURE_H_
#include "base/feature_list.h"
// Feature to choose whether to use the new UI Reboot stack, or the legacy one.
extern const base::Feature kRecentTabsUIReboot;
#endif // IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_FEATURE_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/ntp/recent_tabs/recent_tabs_feature.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
const base::Feature kRecentTabsUIReboot{"RecentTabsUIReboot",
base::FEATURE_DISABLED_BY_DEFAULT};
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