87 lines
4.5 KiB
Diff
87 lines
4.5 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Sun, 5 Nov 2023 17:59:54 +0000
|
|
Subject: Disable Real Box
|
|
|
|
Real-box is search box in ntp
|
|
---
|
|
chrome/browser/prefs/browser_prefs.cc | 2 +-
|
|
.../browser/resources/new_tab_page/app.html | 19 -------------------
|
|
.../searchbox/searchbox_handler.cc | 1 +
|
|
components/search/ntp_features.cc | 4 ++--
|
|
4 files changed, 4 insertions(+), 22 deletions(-)
|
|
|
|
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
|
--- a/chrome/browser/prefs/browser_prefs.cc
|
|
+++ b/chrome/browser/prefs/browser_prefs.cc
|
|
@@ -1987,7 +1987,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
|
registry->RegisterBooleanPref(
|
|
prefs::kLensRegionSearchEnabled, true,
|
|
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
|
- registry->RegisterBooleanPref(prefs::kLensDesktopNTPSearchEnabled, true);
|
|
+ registry->RegisterBooleanPref(prefs::kLensDesktopNTPSearchEnabled, false);
|
|
#endif
|
|
|
|
registry->RegisterBooleanPref(prefs::kDisableScreenshots, false);
|
|
diff --git a/chrome/browser/resources/new_tab_page/app.html b/chrome/browser/resources/new_tab_page/app.html
|
|
--- a/chrome/browser/resources/new_tab_page/app.html
|
|
+++ b/chrome/browser/resources/new_tab_page/app.html
|
|
@@ -40,25 +40,6 @@ import {nothing} from '//resources/lit/v3_0/lit.rollup.js';
|
|
?hidden="${!this.showScrim_}"></div>
|
|
` : ''}
|
|
<div id="searchboxContainer">
|
|
- <cr-searchbox id="searchbox" ?is-dark="${this.isThemeDark_()}"
|
|
- placeholder-text="$i18n{searchBoxPlaceholder}"
|
|
- ?color-source-is-baseline="${this.colorSourceIsBaseline}"
|
|
- @open-composebox="${this.openComposebox_}"
|
|
- @open-lens-search="${this.onOpenLensSearch_}"
|
|
- @open-voice-search="${this.onOpenVoiceSearch_}" ?shown="${this.realboxShown_}"
|
|
- ?had-secondary-side="${this.realboxHadSecondarySide}"
|
|
- @had-secondary-side-changed="${this.onRealboxHadSecondarySideChanged_}"
|
|
- @context-menu-entrypoint-click="${this.onContextMenuEntrypointClick_}"
|
|
- ?can-show-secondary-side="${this.realboxCanShowSecondarySide}"
|
|
- ?compose-button-enabled="${this.composeButtonEnabled}"
|
|
- ?composebox-enabled="${this.composeboxEnabled}"
|
|
- searchbox-layout-mode="${this.realboxLayoutMode_}"
|
|
- ?ntp-realbox-next-enabled="${this.ntpRealboxNextEnabled_}"
|
|
- ?cycling-placeholders="${this.searchboxCyclingPlaceholders_}"
|
|
- @searchbox-input-focus-changed="${this.onInputFocusChanged_}"
|
|
- context-menu-glif-animation-state="${this.contextMenuGlifAnimationState_}"
|
|
- ?multi-line-enabled="${this.multiLineEnabled_}">
|
|
- </cr-searchbox>
|
|
${this.showComposebox_ ? html`
|
|
${this.enableModalComposebox_ ? html`
|
|
<div id="dialogAnchor"></div>
|
|
diff --git a/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc b/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc
|
|
--- a/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc
|
|
+++ b/chrome/browser/ui/webui/cr_components/searchbox/searchbox_handler.cc
|
|
@@ -299,6 +299,7 @@ void SearchboxHandler::SetupWebUIDataSource(content::WebUIDataSource* source,
|
|
Profile* profile,
|
|
bool enable_voice_search,
|
|
bool enable_lens_search) {
|
|
+ enable_lens_search = false;
|
|
// The WebUI Omnibox code will override this to `true` to adjust various
|
|
// color and layout options.
|
|
source->AddBoolean("isTopChromeSearchbox", false);
|
|
diff --git a/components/search/ntp_features.cc b/components/search/ntp_features.cc
|
|
--- a/components/search/ntp_features.cc
|
|
+++ b/components/search/ntp_features.cc
|
|
@@ -114,7 +114,7 @@ BASE_FEATURE(kNtpDriveModuleShowSixFiles, base::FEATURE_ENABLED_BY_DEFAULT);
|
|
|
|
// If enabled, logo will be shown.
|
|
// This is a kill switch. Keep indefinitely.
|
|
-BASE_FEATURE(kNtpLogo, base::FEATURE_ENABLED_BY_DEFAULT);
|
|
+BASE_FEATURE(kNtpLogo, base::FEATURE_DISABLED_BY_DEFAULT);
|
|
|
|
// If enabled, middle slot promo will be shown.
|
|
// This is a kill switch. Keep indefinitely.
|
|
@@ -156,7 +156,7 @@ BASE_FEATURE(kNtpModuleSignInRequirement, base::FEATURE_ENABLED_BY_DEFAULT);
|
|
|
|
// If enabled, OneGoogleBar will be shown.
|
|
// This is a kill switch. Keep indefinitely.
|
|
-BASE_FEATURE(kNtpOneGoogleBar, base::FEATURE_ENABLED_BY_DEFAULT);
|
|
+BASE_FEATURE(kNtpOneGoogleBar, base::FEATURE_DISABLED_BY_DEFAULT);
|
|
|
|
// If enabled, outlook calendar module will be shown.
|
|
BASE_FEATURE(kNtpOutlookCalendarModule, base::FEATURE_ENABLED_BY_DEFAULT);
|
|
--
|