411 lines
20 KiB
Diff
411 lines
20 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Sat, 7 Nov 2020 23:51:29 +0100
|
|
Subject: Restore Simplified NTP launch
|
|
|
|
This reverts commit 4d0e4483c5f77c66a8b6193e8a3bec5d0624d6ad.
|
|
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
chrome/android/chrome_java_resources.gni | 1 +
|
|
chrome/android/chrome_java_sources.gni | 1 +
|
|
.../java/res/layout/new_tab_page_layout.xml | 7 ++
|
|
.../android/java/res/layout/ntp_shortcuts.xml | 65 +++++++++++++++++++
|
|
.../feedback/ChromeFeedbackCollector.java | 1 +
|
|
.../feedback/SimplifiedNtpFeedbackSource.java | 38 +++++++++++
|
|
.../identity_disc/IdentityDiscController.java | 5 +-
|
|
.../NativePageNavigationDelegateImpl.java | 4 +-
|
|
.../chrome/browser/ntp/NewTabPageLayout.java | 31 ++++++++-
|
|
.../SuggestionsNavigationDelegate.java | 17 +++++
|
|
.../flags/android/chrome_feature_list.cc | 1 +
|
|
.../browser/flags/ChromeFeatureList.java | 3 +-
|
|
.../Restore-Simplified-NTP-launch.inc | 12 ++++
|
|
.../Restore-Simplified-NTP-launch.inc | 5 ++
|
|
.../Restore-Simplified-NTP-launch.inc | 1 +
|
|
15 files changed, 186 insertions(+), 6 deletions(-)
|
|
create mode 100644 chrome/android/java/res/layout/ntp_shortcuts.xml
|
|
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java
|
|
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc
|
|
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc
|
|
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc
|
|
|
|
diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
|
|
--- a/chrome/android/chrome_java_resources.gni
|
|
+++ b/chrome/android/chrome_java_resources.gni
|
|
@@ -545,6 +545,7 @@ chrome_java_resources = [
|
|
"java/res/layout/new_tab_page_incognito.xml",
|
|
"java/res/layout/new_tab_page_layout.xml",
|
|
"java/res/layout/new_tab_page_tile_grid_placeholder.xml",
|
|
+ "java/res/layout/ntp_shortcuts.xml",
|
|
"java/res/layout/optional_toolbar_button.xml",
|
|
"java/res/layout/os_version_unsupported_text.xml",
|
|
"java/res/layout/other_forms_of_history_dialog.xml",
|
|
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
|
--- a/chrome/android/chrome_java_sources.gni
|
|
+++ b/chrome/android/chrome_java_sources.gni
|
|
@@ -626,6 +626,7 @@ chrome_java_sources = [
|
|
"java/src/org/chromium/chrome/browser/feedback/FeedFeedbackCollector.java",
|
|
"java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java",
|
|
"java/src/org/chromium/chrome/browser/feedback/ScreenshotTask.java",
|
|
+ "java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java",
|
|
"java/src/org/chromium/chrome/browser/findinpage/FindToolbar.java",
|
|
"java/src/org/chromium/chrome/browser/findinpage/FindToolbarManager.java",
|
|
"java/src/org/chromium/chrome/browser/findinpage/FindToolbarObserver.java",
|
|
diff --git a/chrome/android/java/res/layout/new_tab_page_layout.xml b/chrome/android/java/res/layout/new_tab_page_layout.xml
|
|
--- a/chrome/android/java/res/layout/new_tab_page_layout.xml
|
|
+++ b/chrome/android/java/res/layout/new_tab_page_layout.xml
|
|
@@ -37,6 +37,13 @@ found in the LICENSE file.
|
|
android:layout_marginTop="16dp"
|
|
android:visibility="gone"/>
|
|
|
|
+ <ViewStub
|
|
+ android:id="@+id/shortcuts_stub"
|
|
+ android:layout_width="match_parent"
|
|
+ android:layout_height="wrap_content"
|
|
+ android:inflatedId="@+id/shortcuts"
|
|
+ android:layout="@layout/ntp_shortcuts" />
|
|
+
|
|
<!-- Middle spacer -->
|
|
<View
|
|
android:id="@+id/ntp_middle_spacer"
|
|
diff --git a/chrome/android/java/res/layout/ntp_shortcuts.xml b/chrome/android/java/res/layout/ntp_shortcuts.xml
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/chrome/android/java/res/layout/ntp_shortcuts.xml
|
|
@@ -0,0 +1,65 @@
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
+<!-- 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. -->
|
|
+
|
|
+<LinearLayout
|
|
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
|
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
+ android:id="@+id/shortcuts"
|
|
+ android:layout_width="match_parent"
|
|
+ android:layout_height="wrap_content"
|
|
+ android:paddingStart="16dp"
|
|
+ android:paddingEnd="16dp"
|
|
+ android:baselineAligned="false"
|
|
+ android:gravity="center"
|
|
+ android:orientation="horizontal" >
|
|
+
|
|
+ <FrameLayout
|
|
+ android:id="@+id/bookmarks_button"
|
|
+ android:layout_width="0dp"
|
|
+ android:layout_weight="1"
|
|
+ android:layout_height="wrap_content"
|
|
+ android:minHeight="48dp"
|
|
+ android:background="?attr/selectableItemBackground"
|
|
+ android:paddingTop="4dp"
|
|
+ android:paddingBottom="4dp" >
|
|
+
|
|
+ <org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables
|
|
+ android:layout_width="wrap_content"
|
|
+ android:layout_height="wrap_content"
|
|
+ android:gravity="center"
|
|
+ android:layout_gravity="center"
|
|
+ android:drawablePadding="8dp"
|
|
+ android:drawableStart="@drawable/btn_star_filled"
|
|
+ android:text="@string/menu_bookmarks"
|
|
+ android:textAppearance="@style/TextAppearance.TextSmall.Secondary"
|
|
+ app:drawableHeight="20sp"
|
|
+ app:drawableWidth="20sp"
|
|
+ app:chromeDrawableTint="@color/default_icon_color_light" />
|
|
+ </FrameLayout>
|
|
+
|
|
+ <FrameLayout
|
|
+ android:id="@+id/downloads_button"
|
|
+ android:layout_width="0dp"
|
|
+ android:layout_weight="1"
|
|
+ android:layout_height="wrap_content"
|
|
+ android:minHeight="48dp"
|
|
+ android:background="?attr/selectableItemBackground"
|
|
+ android:paddingTop="4dp"
|
|
+ android:paddingBottom="4dp" >
|
|
+
|
|
+ <org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables
|
|
+ android:layout_width="wrap_content"
|
|
+ android:layout_height="wrap_content"
|
|
+ android:gravity="center"
|
|
+ android:layout_gravity="center"
|
|
+ android:drawablePadding="8dp"
|
|
+ android:drawableStart="@drawable/ic_file_download_white_24dp"
|
|
+ android:text="@string/menu_downloads"
|
|
+ android:textAppearance="@style/TextAppearance.TextSmall.Secondary"
|
|
+ app:drawableHeight="20sp"
|
|
+ app:drawableWidth="20sp"
|
|
+ app:chromeDrawableTint="@color/default_icon_color_light" />
|
|
+ </FrameLayout>
|
|
+</LinearLayout>
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java
|
|
@@ -63,6 +63,7 @@ public class ChromeFeedbackCollector extends FeedbackCollector<ChromeFeedbackCol
|
|
sources.add(new LowEndDeviceFeedbackSource());
|
|
sources.add(new IMEFeedbackSource());
|
|
sources.add(new PermissionFeedbackSource());
|
|
+ sources.add(new SimplifiedNtpFeedbackSource());
|
|
sources.add(new FeedbackContextFeedbackSource(initParams.feedbackContext));
|
|
sources.add(
|
|
new AutoDarkFeedbackSource(initParams.profile, activity, new GURL(initParams.url)));
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java
|
|
@@ -0,0 +1,38 @@
|
|
+// 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.
|
|
+
|
|
+package org.chromium.chrome.browser.feedback;
|
|
+
|
|
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
|
+import org.chromium.chrome.browser.ntp.NewTabPageLayout;
|
|
+
|
|
+import java.util.HashMap;
|
|
+import java.util.Map;
|
|
+
|
|
+/**
|
|
+ * Provides information about whether the simplified NTP is enabled for use in feedback reports.
|
|
+ */
|
|
+public class SimplifiedNtpFeedbackSource implements FeedbackSource {
|
|
+ private static final String SIMPLIFIED_NTP_KEY = "Simplified NTP";
|
|
+ private static final String ENABLED_VALUE = "Enabled";
|
|
+ private static final String DISABLED_VALUE = "Disabled";
|
|
+
|
|
+ private final HashMap<String, String> mMap;
|
|
+
|
|
+ SimplifiedNtpFeedbackSource() {
|
|
+ mMap = new HashMap<String, String>(1);
|
|
+
|
|
+ boolean isEnabled = ChromeFeatureList.isEnabled(ChromeFeatureList.SIMPLIFIED_NTP);
|
|
+ if (!isEnabled) {
|
|
+ mMap.put(SIMPLIFIED_NTP_KEY, DISABLED_VALUE);
|
|
+ } else {
|
|
+ mMap.put(SIMPLIFIED_NTP_KEY, ENABLED_VALUE);
|
|
+ }
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Map<String, String> getFeedback() {
|
|
+ return mMap;
|
|
+ }
|
|
+}
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java
|
|
@@ -175,7 +175,10 @@ public class IdentityDiscController
|
|
|
|
mButtonData.setButtonSpec(
|
|
buttonSpecWithDrawableAndDescription(mButtonData.getButtonSpec(), email));
|
|
- mButtonData.setCanShow(true);
|
|
+ if (email == null)
|
|
+ mButtonData.setCanShow(false);
|
|
+ else
|
|
+ mButtonData.setCanShow(true);
|
|
}
|
|
|
|
private ButtonSpec buttonSpecWithDrawableAndDescription(
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java
|
|
@@ -23,9 +23,9 @@ import org.chromium.ui.mojom.WindowOpenDisposition;
|
|
|
|
/** {@link NativePageNavigationDelegate} implementation. */
|
|
public class NativePageNavigationDelegateImpl implements NativePageNavigationDelegate {
|
|
- private final Profile mProfile;
|
|
+ protected final Profile mProfile;
|
|
private final TabModelSelector mTabModelSelector;
|
|
- private final Tab mTab;
|
|
+ protected final Tab mTab;
|
|
|
|
protected final Activity mActivity;
|
|
protected final NativePageHost mHost;
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
|
|
@@ -18,6 +18,7 @@ import android.util.AttributeSet;
|
|
import android.view.DragEvent;
|
|
import android.view.Gravity;
|
|
import android.view.LayoutInflater;
|
|
+import android.view.ViewStub;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.LinearLayout;
|
|
@@ -37,6 +38,7 @@ import org.chromium.chrome.browser.compositor.layouts.content.InvalidationAwareT
|
|
import org.chromium.chrome.browser.feed.FeedSurfaceScrollDelegate;
|
|
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
|
import org.chromium.chrome.browser.lens.LensEntryPoint;
|
|
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
|
import org.chromium.chrome.browser.lens.LensMetrics;
|
|
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
|
|
import org.chromium.chrome.browser.logo.LogoBridge.Logo;
|
|
@@ -103,6 +105,8 @@ public class NewTabPageLayout extends LinearLayout {
|
|
private @Nullable DisplayStyleObserver mDisplayStyleObserver;
|
|
private CallbackController mCallbackController = new CallbackController();
|
|
|
|
+ private ViewGroup mShortcutsView;
|
|
+
|
|
/**
|
|
* Whether the tiles shown in the layout have finished loading.
|
|
* With {@link #mHasShownView}, it's one of the 2 flags used to track initialisation progress.
|
|
@@ -309,6 +313,7 @@ public class NewTabPageLayout extends LinearLayout {
|
|
isScrollableMvtEnabled(),
|
|
searchProviderIsGoogle);
|
|
initializeSearchBoxBackground();
|
|
+ initializeShortcuts();
|
|
initializeSearchBoxTextView();
|
|
initializeVoiceSearchButton();
|
|
initializeLensButton();
|
|
@@ -782,12 +787,15 @@ public class NewTabPageLayout extends LinearLayout {
|
|
marginLayoutParams.leftMargin = lateralPaddingsForNtp;
|
|
marginLayoutParams.rightMargin = lateralPaddingsForNtp;
|
|
}
|
|
- marginLayoutParams.topMargin =
|
|
+ // when simplified NTP is enabled the top marging is included in its view's padding
|
|
+ if (mShortcutsView == null) {
|
|
+ marginLayoutParams.topMargin =
|
|
getResources()
|
|
.getDimensionPixelSize(
|
|
shouldShowLogo()
|
|
? R.dimen.tile_grid_layout_top_margin
|
|
: R.dimen.tile_grid_layout_no_logo_top_margin);
|
|
+ }
|
|
marginLayoutParams.bottomMargin =
|
|
getResources()
|
|
.getDimensionPixelSize(R.dimen.tile_carousel_layout_bottom_margin);
|
|
@@ -795,7 +803,10 @@ public class NewTabPageLayout extends LinearLayout {
|
|
// Set a bit more top padding on the tile grid if there is no logo.
|
|
ViewGroup.LayoutParams layoutParams = mMvTilesContainerLayout.getLayoutParams();
|
|
layoutParams.width = ViewGroup.LayoutParams.WRAP_CONTENT;
|
|
- marginLayoutParams.topMargin = getGridMvtTopMargin();
|
|
+ // when simplified NTP is enabled the top marging is included in its view's padding
|
|
+ if (mShortcutsView == null) {
|
|
+ marginLayoutParams.topMargin = getGridMvtTopMargin();
|
|
+ }
|
|
marginLayoutParams.bottomMargin = getGridMvtBottomMargin();
|
|
}
|
|
|
|
@@ -1093,6 +1104,22 @@ public class NewTabPageLayout extends LinearLayout {
|
|
return iphCommandBuilder;
|
|
}
|
|
|
|
+ private void initializeShortcuts() {
|
|
+ if (!ChromeFeatureList.isEnabled(ChromeFeatureList.SIMPLIFIED_NTP)) {
|
|
+ return;
|
|
+ }
|
|
+
|
|
+ ViewStub shortcutsStub = findViewById(R.id.shortcuts_stub);
|
|
+ mShortcutsView = (ViewGroup) shortcutsStub.inflate();
|
|
+
|
|
+ mShortcutsView.findViewById(R.id.bookmarks_button)
|
|
+ .setOnClickListener(view -> mManager.getNavigationDelegate().navigateToBookmarks());
|
|
+
|
|
+ mShortcutsView.findViewById(R.id.downloads_button)
|
|
+ .setOnClickListener(
|
|
+ view -> mManager.getNavigationDelegate().navigateToDownloadManager());
|
|
+ }
|
|
+
|
|
/** Makes the Search Box and Logo as wide as Most Visited. */
|
|
private void unifyElementWidths() {
|
|
View searchBoxView = getSearchBoxView();
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java
|
|
@@ -14,6 +14,11 @@ import org.chromium.chrome.browser.ui.native_page.NativePageHost;
|
|
import org.chromium.content_public.browser.LoadUrlParams;
|
|
import org.chromium.ui.base.PageTransition;
|
|
|
|
+import org.chromium.chrome.browser.bookmarks.BookmarkUtils;
|
|
+import org.chromium.chrome.browser.download.DownloadUtils;
|
|
+import org.chromium.chrome.browser.download.DownloadOpenSource;
|
|
+import org.chromium.chrome.browser.profiles.OTRProfileID;
|
|
+
|
|
/** Extension of {@link NativePageNavigationDelegate} with suggestions-specific methods. */
|
|
public class SuggestionsNavigationDelegate extends NativePageNavigationDelegateImpl {
|
|
public SuggestionsNavigationDelegate(
|
|
@@ -25,6 +30,18 @@ public class SuggestionsNavigationDelegate extends NativePageNavigationDelegateI
|
|
super(activity, profile, host, tabModelSelector, tab);
|
|
}
|
|
|
|
+ public void navigateToBookmarks() {
|
|
+ BookmarkUtils.showBookmarkManager(mActivity, mTab.isIncognito());
|
|
+ }
|
|
+
|
|
+ public void navigateToDownloadManager() {
|
|
+ OTRProfileID otrProfileID = null;
|
|
+ if (mProfile != null && mTab != null && mTab.isIncognito()) {
|
|
+ otrProfileID = mProfile.getOTRProfileID();
|
|
+ }
|
|
+ DownloadUtils.showDownloadManager(mActivity, mTab, otrProfileID, DownloadOpenSource.NEW_TAB_PAGE);
|
|
+ }
|
|
+
|
|
/**
|
|
* Opens the suggestions page without recording metrics.
|
|
*
|
|
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
|
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
|
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
|
@@ -223,6 +223,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
|
&kGridTabSwitcherAndroidAnimations,
|
|
&kIncognitoReauthenticationForAndroid,
|
|
&kIncognitoScreenshot,
|
|
+ &kSimplifiedNTP,
|
|
&kInstantStart,
|
|
&kLensOnQuickActionSearchWidget,
|
|
&kMagicStackAndroid,
|
|
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
|
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
|
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
|
@@ -325,6 +325,7 @@ public abstract class ChromeFeatureList {
|
|
"LookalikeUrlNavigationSuggestionsUI";
|
|
public static final String MAGIC_STACK_ANDROID = "MagicStackAndroid";
|
|
public static final String MESSAGES_FOR_ANDROID_ADS_BLOCKED = "MessagesForAndroidAdsBlocked";
|
|
+ public static final String SIMPLIFIED_NTP = "SimplifiedNTP";
|
|
public static final String MESSAGES_FOR_ANDROID_INFRASTRUCTURE =
|
|
"MessagesForAndroidInfrastructure";
|
|
public static final String SEARCH_READY_OMNIBOX = "SearchReadyOmnibox";
|
|
@@ -634,7 +635,7 @@ public abstract class ChromeFeatureList {
|
|
newCachedFlag(ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW, true);
|
|
public static final CachedFlag sStartSurfaceWithAccessibility =
|
|
newCachedFlag(START_SURFACE_WITH_ACCESSIBILITY, true);
|
|
- public static final CachedFlag sSurfacePolish = newCachedFlag(SURFACE_POLISH, true);
|
|
+ public static final CachedFlag sSurfacePolish = newCachedFlag(SURFACE_POLISH, false);
|
|
public static final CachedFlag sTabDragDropAsWindowAndroid =
|
|
newCachedFlag(TAB_DRAG_DROP_ANDROID, false);
|
|
public static final CachedFlag sTabGroupPaneAndroid =
|
|
diff --git a/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc
|
|
@@ -0,0 +1,12 @@
|
|
+#if BUILDFLAG(IS_ANDROID)
|
|
+
|
|
+#ifdef FLAG_SECTION
|
|
+
|
|
+ {"simplified-ntp",
|
|
+ "Simplified NTP",
|
|
+ "Show a simplified New Tab Page.", kOsAndroid,
|
|
+ FEATURE_VALUE_TYPE(chrome::android::kSimplifiedNTP)},
|
|
+
|
|
+#endif
|
|
+
|
|
+#endif
|
|
diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc
|
|
@@ -0,0 +1,5 @@
|
|
+CROMITE_FEATURE(kSimplifiedNTP,
|
|
+ "SimplifiedNTP",
|
|
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
|
+
|
|
+SET_CROMITE_FEATURE_DISABLED(kSurfacePolish);
|
|
diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc
|
|
@@ -0,0 +1 @@
|
|
+BASE_DECLARE_FEATURE(kSimplifiedNTP);
|
|
--
|