mirror of
https://github.com/uazo/cromite.git
synced 2025-12-28 07:54:50 +00:00
85 lines
4.4 KiB
Diff
85 lines
4.4 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 +-
|
|
chrome/browser/resources/new_tab_page/app.html | 17 -----------------
|
|
.../ui/webui/searchbox/searchbox_handler.cc | 1 +
|
|
components/search/ntp_features.cc | 4 ++--
|
|
4 files changed, 4 insertions(+), 20 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
|
|
@@ -2235,7 +2235,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,23 +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_}"
|
|
- ?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_}"
|
|
- ?ntp-next-features-enabled="${this.ntpNextFeaturesEnabled_}">
|
|
- </cr-searchbox>
|
|
${this.showComposebox_ ? html`
|
|
<cr-composebox id="composebox"
|
|
?ntp-realbox-next-enabled="${this.ntpRealboxNextEnabled_}"
|
|
diff --git a/chrome/browser/ui/webui/searchbox/searchbox_handler.cc b/chrome/browser/ui/webui/searchbox/searchbox_handler.cc
|
|
--- a/chrome/browser/ui/webui/searchbox/searchbox_handler.cc
|
|
+++ b/chrome/browser/ui/webui/searchbox/searchbox_handler.cc
|
|
@@ -298,6 +298,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
|
|
@@ -109,7 +109,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.
|
|
@@ -151,7 +151,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);
|
|
--
|