Commit 660b7591 authored by Tibor Goldschwendt's avatar Tibor Goldschwendt Committed by Chromium LUCI CQ

[ntp] Add flag to disable the logo

Makes the logo Finch-configurable. Flag is enabled by default.

Bug: 1168361
Change-Id: Ie9fbeebb5f88fcf6ca2d6a418759f65e61d3231e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2639153
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845490}
parent ed0bd7c8
......@@ -253,10 +253,12 @@
hidden$="[[!oneGoogleBarLoaded_]]">
</ntp-iframe>
</template>
<ntp-logo id="logo" doodle-allowed$="[[doodleAllowed_]]"
single-colored$="[[singleColoredLogo_]]" dark="[[theme_.isDark]]"
background-color="[[backgroundColor_]]">
</ntp-logo>
<template is="dom-if" if="[[logoEnabled_]]">
<ntp-logo id="logo" doodle-allowed$="[[doodleAllowed_]]"
single-colored$="[[singleColoredLogo_]]" dark="[[theme_.isDark]]"
background-color="[[backgroundColor_]]">
</ntp-logo>
</template>
<ntp-realbox id="realbox" on-open-voice-search="onOpenVoiceSearch_"
theme="[[theme_.searchBox]]" shown$="[[realboxShown_]]">
</ntp-realbox>
......
......@@ -190,6 +190,12 @@ class AppElement extends PolymerElement {
computed: 'computeRealboxShown_(theme_)',
},
/** @private */
logoEnabled_: {
type: Boolean,
value: () => loadTimeData.getBoolean('logoEnabled'),
},
/** @private */
shortcutsEnabled_: {
type: Boolean,
......
......@@ -100,6 +100,8 @@ content::WebUIDataSource* CreateNewTabPageUiHtmlSource(Profile* profile) {
base::FeatureList::IsEnabled(ntp_features::kWebUIThemeModeDoodles));
source->AddBoolean("shortcutsEnabled",
base::FeatureList::IsEnabled(ntp_features::kNtpShortcuts));
source->AddBoolean("logoEnabled",
base::FeatureList::IsEnabled(ntp_features::kNtpLogo));
source->AddBoolean(
"middleSlotPromoEnabled",
base::FeatureList::IsEnabled(ntp_features::kNtpMiddleSlotPromo));
......
......@@ -75,6 +75,9 @@ const base::Feature kWebUI{"NtpWebUI", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kWebUIThemeModeDoodles{"WebUIThemeModeDoodles",
base::FEATURE_ENABLED_BY_DEFAULT};
// If enabled, logo will be shown.
const base::Feature kNtpLogo{"NtpLogo", base::FEATURE_ENABLED_BY_DEFAULT};
// If enabled, shortcuts will be shown.
const base::Feature kNtpShortcuts{"NtpShortcuts",
base::FEATURE_ENABLED_BY_DEFAULT};
......
......@@ -26,6 +26,7 @@ extern const base::Feature kRealboxMatchOmniboxTheme;
extern const base::Feature kRealboxUseGoogleGIcon;
extern const base::Feature kWebUI;
extern const base::Feature kWebUIThemeModeDoodles;
extern const base::Feature kNtpLogo;
extern const base::Feature kNtpShortcuts;
extern const base::Feature kNtpMiddleSlotPromo;
extern const base::Feature kModules;
......
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