@ -1,38 +1,39 @@
From d3529c6a229e229a13e942540ab7d53cbc485cc6 Mon Sep 17 00:00:00 2001
From 24fca3c63c8240c9e4214163947f71a404300ac1 Mon Sep 17 00:00:00 2001
From: tigro <tigro@msvsphere-os.ru>
From: tigro <tigro@msvsphere-os.ru>
Date: Thu, 25 Jul 2024 18:22:15 +0300
Date: Tue, 27 Aug 2024 14:43:09 +0300
Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page
Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page
---
---
chrome/app/generated_resources.grd | 2 --
chrome/app/generated_resources.grd | 2 --
.../app/resources/generated_resources_be.xtb | 2 +-
chrome/app/resources/generated_resources_be.xtb | 4 ++--
.../resources/generated_resources_en-GB.xtb | 2 +-
chrome/app/resources/generated_resources_en-GB.xtb | 2 +-
.../app/resources/generated_resources_ru.xtb | 2 +-
chrome/app/resources/generated_resources_ru.xtb | 2 +-
.../app/resources/generated_resources_uk.xtb | 2 +-
chrome/app/resources/generated_resources_uk.xtb | 2 +-
chrome/browser/history/top_sites_factory.cc | 4 ++--
chrome/browser/history/top_sites_factory.cc | 4 ++--
.../resources/new_tab_page/lens_form.html | 1 +
.../browser/resources/new_tab_page/lens_form.html | 1 +
.../resources/new_tab_page/lens_form.ts | 19 ++++++++++++++++++-
chrome/browser/resources/new_tab_page/lens_form.ts | 6 +++---
.../new_tab_page/lens_upload_dialog.html | 10 +++++-----
.../resources/new_tab_page/lens_upload_dialog.css | 2 +-
.../browser/resources/new_tab_page/logo.html | 5 +----
.../resources/new_tab_page/lens_upload_dialog.html | 8 ++++----
chrome/browser/resources/new_tab_page/logo.ts | 2 +-
chrome/browser/resources/new_tab_page/logo.css | 5 +----
chrome/browser/search/search.cc | 7 +++++++
chrome/browser/resources/new_tab_page/logo.ts | 2 +-
chrome/browser/search/search.h | 2 ++
chrome/browser/search/search.cc | 7 +++++++
.../ui/webui/new_tab_page/new_tab_page_ui.cc | 5 +++++
chrome/browser/search/search.h | 2 ++
components/search/search.cc | 14 ++++++++++++++
.../ui/webui/new_tab_page/new_tab_page_ui.cc | 5 +++++
components/search/search.h | 7 +++++++
components/search/search.cc | 14 ++++++++++++++
components/search_engines/keyword_table.cc | 4 ++++
components/search/search.h | 7 +++++++
.../search_engines/prepopulated_engines.json | 11 ++++++-----
components/search_engines/keyword_table.cc | 4 ++++
.../search_engine_countries-inc.cc | 9 +++++----
.../search_engines/prepopulated_engines.json | 11 ++++++-----
.../search_engines/template_url_data_util.cc | 6 +++++-
.../search_engines/search_engine_countries-inc.cc | 9 +++++----
.../template_url_prepopulate_data.cc | 9 ++++++++-
.../search_engines/template_url_data_util.cc | 6 +++++-
.../cr_components/searchbox/realbox.html | 7 +++++++
.../template_url_prepopulate_data.cc | 9 ++++++++-
22 files changed, 102 insertions(+), 30 deletions(-)
.../resources/cr_components/searchbox/realbox.html | 7 +++++++
23 files changed, 88 insertions(+), 33 deletions(-)
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 3 a9f1ea3d2..ae7b29fe19 100644
index 3 66de3cb51..f1b7148608 100644
--- a/chrome/app/generated_resources.grd
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -77 33,10 +7733 ,8 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -77 42,10 +7742 ,8 @@ Keep your key file in a safe place. You will need it to create new versions of y
<!-- NTP -->
<!-- NTP -->
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT_MD" desc="The text displayed in the fakebox (on the New Tab page) when it is empty, Google is the default search engine, and the Material Design UI is enabled.">
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT_MD" desc="The text displayed in the fakebox (on the New Tab page) when it is empty, Google is the default search engine, and the Material Design UI is enabled.">
@ -44,23 +45,30 @@ index 3a9f1ea3d2..ae7b29fe19 100644
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT_MULTIMODAL" desc="The text displayed in the multimodal searchbox when it is empty. It is meant to invite the user to add a text query to the existing image query in order to issue a 'multimodal' (image + text) query.">
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT_MULTIMODAL" desc="The text displayed in the multimodal searchbox when it is empty. It is meant to invite the user to add a text query to the existing image query in order to issue a 'multimodal' (image + text) query.">
Add to your search
Add to your search
diff --git a/chrome/app/resources/generated_resources_be.xtb b/chrome/app/resources/generated_resources_be.xtb
diff --git a/chrome/app/resources/generated_resources_be.xtb b/chrome/app/resources/generated_resources_be.xtb
index b0de6288a7..08a8252694 100644
index cf57c86031..5c700fad3d 100644
--- a/chrome/app/resources/generated_resources_be.xtb
--- a/chrome/app/resources/generated_resources_be.xtb
+++ b/chrome/app/resources/generated_resources_be.xtb
+++ b/chrome/app/resources/generated_resources_be.xtb
@@ -9 507,7 +9507 ,7 @@
@@ -9 669,7 +9669 ,7 @@
<translation id="8048728378294435881">Стварайце рэзервовыя копіі сваіх даных, каб і х можна было выкарыстоўваць на іншых прыладах</translation>
<translation id="8048728378294435881">Стварайце рэзервовыя копіі сваіх даных, каб і х можна было выкарыстоўваць на іншых прыладах</translation>
<translation id="8048977114738515028">Стварыце ярлык на працоўным стале прылады, каб мець прамы доступ да гэтага профілю</translation>
<translation id="8048977114738515028">Стварыце ярлык на працоўным стале прылады, каб мець прамы доступ да гэтага профілю</translation>
<translation id="8049029041626250638">Падключыце клавіятуру а б о мыш. Калі вы выкарыстоўваеце прылады з Bluetooth, упэўніцеся, што яны гатовыя да спалучэння.</translation>
<translation id="8049029041626250638">Падключыце клавіятуру а б о мыш. Калі вы выкарыстоўваеце прылады з Bluetooth, упэўніцеся, што яны гатовыя да спалучэння.</translation>
-<translation id="8049122382261047457">Шукайце відарысы з дапамогай Google А б ' ектыва</translation>
-<translation id="8049122382261047457">Шукайце відарысы з дапамогай Google А б ’ ектыва</translation>
+<translation id="8049122382261047457">Шукайце відарысы</translation>
+<translation id="8049122382261047457">Шукайце відарысы</translation>
<translation id="8049705080247101012">У Google пашырэнне "<ph name="EXTENSION_NAME" />" абазначана як шкоднае. Яго ўсталяванне было прадухілена</translation>
<translation id="8049705080247101012">У Google пашырэнне "<ph name="EXTENSION_NAME" />" абазначана як шкоднае. Яго ўсталяванне было прадухілена</translation>
<translation id="8049948037269924837">Адваротная прагортка сэнсарнай панэллю</translation>
<translation id="8049948037269924837">Адваротная прагортка сэнсарнай панэллю</translation>
<translation id="8050038245906040378">Камерцыйнае падпісванне кода ў Microsoft</translation>
<translation id="8050038245906040378">Камерцыйнае падпісванне кода ў Microsoft</translation>
@@ -11412,4 +11412,4 @@
<translation id="997143476478634194">Пры наведванні сайтаў яны будуць аўтаматычна ўлічваць гэту наладу. Звычайна сайты адпраўляюць апавяшчэнні, каб паведаміць вам пра экстранныя навіны а б о новыя паведамленні ў чаце.</translation>
<translation id="99731366405731005">К а б выкарыстоўваць функцыю сінхранізацыі параметраў Wi-Fi, уключыце <ph name="LINK1_BEGIN" />Сінхранізацыю Chrome<ph name="LINK1_END" />. <ph name="LINK2_BEGIN" />Даведацца больш<ph name="LINK2_END" /></translation>
<translation id="998747458861718449">Пра&верыць</translation>
-</translationbundle>
\ No newline at end of file
+</translationbundle>
diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb
diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb
index 9e06a084c2..e87dd7bf09 100644
index c637034755..94eb5e6a86 100644
--- a/chrome/app/resources/generated_resources_en-GB.xtb
--- a/chrome/app/resources/generated_resources_en-GB.xtb
+++ b/chrome/app/resources/generated_resources_en-GB.xtb
+++ b/chrome/app/resources/generated_resources_en-GB.xtb
@@ -9518,7 +9518,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -9 680,7 +9680 ,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
<translation id="8048728378294435881">Back up your stuff and use it on any device</translation>
<translation id="8048728378294435881">Back up your stuff and use it on any device</translation>
<translation id="8048977114738515028">Create a desktop shortcut on your device to access directly to this profile</translation>
<translation id="8048977114738515028">Create a desktop shortcut on your device to access directly to this profile</translation>
<translation id="8049029041626250638">Connect a keyboard or mouse. If you are using Bluetooth devices, make sure that your devices are ready to pair.</translation>
<translation id="8049029041626250638">Connect a keyboard or mouse. If you are using Bluetooth devices, make sure that your devices are ready to pair.</translation>
@ -70,10 +78,10 @@ index 9e06a084c2..e87dd7bf09 100644
<translation id="8049948037269924837">Touchpad reverse scrolling</translation>
<translation id="8049948037269924837">Touchpad reverse scrolling</translation>
<translation id="8050038245906040378">Microsoft Commercial Code Signing</translation>
<translation id="8050038245906040378">Microsoft Commercial Code Signing</translation>
diff --git a/chrome/app/resources/generated_resources_ru.xtb b/chrome/app/resources/generated_resources_ru.xtb
diff --git a/chrome/app/resources/generated_resources_ru.xtb b/chrome/app/resources/generated_resources_ru.xtb
index dd0110ed61..fe6b05c22d 100644
index 759b1346db..27e6f4b72c 100644
--- a/chrome/app/resources/generated_resources_ru.xtb
--- a/chrome/app/resources/generated_resources_ru.xtb
+++ b/chrome/app/resources/generated_resources_ru.xtb
+++ b/chrome/app/resources/generated_resources_ru.xtb
@@ -9 512,7 +9512 ,7 @@
@@ -9 673,7 +9673 ,7 @@
<translation id="8048728378294435881">Создайте резервную копию данных и используйте их на любом устройстве.</translation>
<translation id="8048728378294435881">Создайте резервную копию данных и используйте их на любом устройстве.</translation>
<translation id="8048977114738515028">Чтобы быстро переключаться на этот профиль, создайте ярлык на рабочем столе</translation>
<translation id="8048977114738515028">Чтобы быстро переключаться на этот профиль, создайте ярлык на рабочем столе</translation>
<translation id="8049029041626250638">Подключите мышь или клавиатуру. Если вы используете устройства Bluetooth, убедитесь, что они готовы к подключению.</translation>
<translation id="8049029041626250638">Подключите мышь или клавиатуру. Если вы используете устройства Bluetooth, убедитесь, что они готовы к подключению.</translation>
@ -83,10 +91,10 @@ index dd0110ed61..fe6b05c22d 100644
<translation id="8049948037269924837">Обратное направление прокрутки с помощью сенсорной панели</translation>
<translation id="8049948037269924837">Обратное направление прокрутки с помощью сенсорной панели</translation>
<translation id="8050038245906040378">Подписывание коммерческого кода Microsoft</translation>
<translation id="8050038245906040378">Подписывание коммерческого кода Microsoft</translation>
diff --git a/chrome/app/resources/generated_resources_uk.xtb b/chrome/app/resources/generated_resources_uk.xtb
diff --git a/chrome/app/resources/generated_resources_uk.xtb b/chrome/app/resources/generated_resources_uk.xtb
index 3 69b16c102..2873728092 100644
index 3 4039a1a6d..84b33f4e51 100644
--- a/chrome/app/resources/generated_resources_uk.xtb
--- a/chrome/app/resources/generated_resources_uk.xtb
+++ b/chrome/app/resources/generated_resources_uk.xtb
+++ b/chrome/app/resources/generated_resources_uk.xtb
@@ -9 522,7 +9522 ,7 @@
@@ -9 683,7 +9683 ,7 @@
<translation id="8048728378294435881">Створюйте резервні копії даних і використовуйте їх на будь-якому пристрої</translation>
<translation id="8048728378294435881">Створюйте резервні копії даних і використовуйте їх на будь-якому пристрої</translation>
<translation id="8048977114738515028">Створити ярлик на робочому столі, щоб відразу переходити до цього профілю</translation>
<translation id="8048977114738515028">Створити ярлик на робочому столі, щоб відразу переходити до цього профілю</translation>
<translation id="8049029041626250638">Підключіть клавіатуру а б о мишу. Якщо ви користуєтеся пристроями з Bluetooth, переконайтеся, що вони готові до підключення.</translation>
<translation id="8049029041626250638">Підключіть клавіатуру а б о мишу. Якщо ви користуєтеся пристроями з Bluetooth, переконайтеся, що вони готові до підключення.</translation>
@ -96,7 +104,7 @@ index 369b16c102..2873728092 100644
<translation id="8049948037269924837">Зворотне прокручування на сенсорній панелі</translation>
<translation id="8049948037269924837">Зворотне прокручування на сенсорній панелі</translation>
<translation id="8050038245906040378">Підписування комерційного коду Microsoft</translation>
<translation id="8050038245906040378">Підписування комерційного коду Microsoft</translation>
diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc
diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc
index 8f20a76a66..d1a13e7046 100644
index 0da9ce7baf..7ade1ebfe1 100644
--- a/chrome/browser/history/top_sites_factory.cc
--- a/chrome/browser/history/top_sites_factory.cc
+++ b/chrome/browser/history/top_sites_factory.cc
+++ b/chrome/browser/history/top_sites_factory.cc
@@ -54,7 +54,7 @@ struct RawPrepopulatedPage {
@@ -54,7 +54,7 @@ struct RawPrepopulatedPage {
@ -118,156 +126,103 @@ index 8f20a76a66..d1a13e7046 100644
PrefService* pref_service = profile->GetPrefs();
PrefService* pref_service = profile->GetPrefs();
bool hide_web_store_icon =
bool hide_web_store_icon =
diff --git a/chrome/browser/resources/new_tab_page/lens_form.html b/chrome/browser/resources/new_tab_page/lens_form.html
diff --git a/chrome/browser/resources/new_tab_page/lens_form.html b/chrome/browser/resources/new_tab_page/lens_form.html
index 57c6387c7e..0f31a59767 100644
index 72bd92c5ab..2604d9c0dd 100644
--- a/chrome/browser/resources/new_tab_page/lens_form.html
--- a/chrome/browser/resources/new_tab_page/lens_form.html
+++ b/chrome/browser/resources/new_tab_page/lens_form.html
+++ b/chrome/browser/resources/new_tab_page/lens_form.html
@@ -1 8,6 +18 ,7 @@
@@ -1 1,6 +11 ,7 @@
<form id="urlForm"
<form id="urlForm"
action="[[uploadUrlAction_]] "
.action="${this.uploadUrlAction_} "
method="GET">
method="GET">
+ <input name="rpt" value="imageview"></input>
+ <input name="rpt" . value="imageview"></input>
<input name="url" value="[[uploadUrl_]] "></input>
<input name="url" .value="${this.uploadUrl_} "></input>
<input name="ep" value="[[uploadUrlEntrypoint_]] "></input>
<input name="ep" .value="${this.uploadUrlEntrypoint_} "></input>
<input name="hl" value="[[language_]] "></input>
<input name="hl" .value="${this.language_} "></input>
diff --git a/chrome/browser/resources/new_tab_page/lens_form.ts b/chrome/browser/resources/new_tab_page/lens_form.ts
diff --git a/chrome/browser/resources/new_tab_page/lens_form.ts b/chrome/browser/resources/new_tab_page/lens_form.ts
index bf24f4c495..167b57bc5e 100644
index db3180269e..5a30a2de0d 100644
--- a/chrome/browser/resources/new_tab_page/lens_form.ts
--- a/chrome/browser/resources/new_tab_page/lens_form.ts
+++ b/chrome/browser/resources/new_tab_page/lens_form.ts
+++ b/chrome/browser/resources/new_tab_page/lens_form.ts
@@ -12,11 +12,14 @@ import {getTemplate} from './lens_form.html.js';
@@ -11,14 +11,14 @@ import {getCss} from './lens_form.css.js';
import {getHtml} from './lens_form.html.js';
/** Lens service endpoint for the Upload by File action. */
/** Lens service endpoint for the Upload by File action. */
const SCOTTY_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/upload';
- const SCOTTY_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/upload';
const DIRECT_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/v3/upload';
- const DIRECT_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/v3/upload';
+const SCOTTY_UPLOAD_FILE_ACTION _YA : string = 'https://yandex.ru/images/search';
+const SCOTTY_UPLOAD_FILE_ACTION : string = 'https://yandex.ru/images/search';
+const DIRECT_UPLOAD_FILE_ACTION _YA : string = 'https://yandex.ru/images/search';
+const DIRECT_UPLOAD_FILE_ACTION : string = 'https://yandex.ru/images/search';
/** Entrypoint for the upload by file action. */
/** Entrypoint for the upload by file action. */
const UPLOAD_FILE_ENTRYPOINT: string = 'cntpubb';
const UPLOAD_FILE_ENTRYPOINT: string = 'cntpubb';
/** Lens service endpoint for the Upload by URL action. */
/** Lens service endpoint for the Upload by URL action. */
+const UPLOAD_BY_URL_ACTION_YA: string = 'https://yandex.ru/images/search ';
-const UPLOAD_BY_URL_ACTION: string = 'https://lens.google.com/uploadbyurl ';
const UPLOAD_BY_URL_ACTION: string = 'https://lens.google.com/uploadbyurl';
+const UPLOAD_BY_URL_ACTION: string = 'https://yandex.ru/images/search';
/** Entrypoint for the upload by url action. */
/** Entrypoint for the upload by url action. */
@@ -74,6 +77,7 @@ export class LensFormElement extends PolymerElement {
const UPLOAD_URL_ENTRYPOINT: string = 'cntpubu';
}
diff --git a/chrome/browser/resources/new_tab_page/lens_upload_dialog.css b/chrome/browser/resources/new_tab_page/lens_upload_dialog.css
index bde20d9920..ef6dfbdd24 100644
static get properties() {
--- a/chrome/browser/resources/new_tab_page/lens_upload_dialog.css
+ let isYandex = loadTimeData.getBoolean('googleLensForYandex');
+++ b/chrome/browser/resources/new_tab_page/lens_upload_dialog.css
return {
@@ -109,7 +109,7 @@
supportedFileTypes_: {
display: flex;
type: String,
flex-direction: column;
@@ -99,7 +103,7 @@ export class LensFormElement extends PolymerElement {
flex-grow: 1;
uploadUrlAction_: {
- height: 280px;
type: String,
+ height: 110px;
readOnly: true,
padding: 20px;
- value: UPLOAD_BY_URL_ACTION,
position: relative;
+ value: ((isYandex == true)?UPLOAD_BY_URL_ACTION_YA:UPLOAD_BY_URL_ACTION),
width: 100%;
},
uploadUrl_: String,
uploadUrlEntrypoint_: {
@@ -117,6 +121,11 @@ export class LensFormElement extends PolymerElement {
readOnly: true,
value: loadTimeData.getString('realboxLensVariations'),
},
+ useYandexForPics_: {
+ type: Boolean,
+ readOnly: true,
+ value: isYandex,
+ },
};
}
@@ -126,6 +135,7 @@ export class LensFormElement extends PolymerElement {
private startTime_: string|null = null;
private clientData_: string;
private useDirectUpload_: boolean;
+ private isYandexProp_: boolean = loadTimeData.getBoolean('googleLensForYandex');
openSystemFilePicker() {
this.$.fileInput.click();
@@ -153,6 +163,11 @@ export class LensFormElement extends PolymerElement {
}
private async submitFile_(file: File) {
+
+ if (this.isYandexProp_ == true) {
+ return;
+ } else {
+
if (!SUPPORTED_FILE_TYPES.includes(file.type)) {
this.dispatchError_(LensErrorType.FILE_TYPE);
return;
@@ -194,8 +209,10 @@ export class LensFormElement extends PolymerElement {
processedFile.imageWidth ? processedFile.imageWidth.toString() : '');
this.uploadFileAction_ = action.toString();
+
this.dispatchLoading_(LensSubmitType.FILE);
this.$.fileForm.submit();
+ }
}
submitUrl(urlString: string) {
diff --git a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
diff --git a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
index a6eb910711..703311b280 100644
index c406c42ed3..3ab96ac7ca 100644
--- a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
--- a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
+++ b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
+++ b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
@@ -99,7 +99,7 @@
@@ -22,7 +22,7 @@
display: flex;
` : ''}
flex-direction: column;
flex-grow: 1;
- height: 280px;
+ height: 110px;
padding: 20px;
position: relative;
width: 100%;
@@ -365,7 +365,7 @@
</template>
<!-- Normal state -->
<!-- Normal state -->
<template is="dom-if" if="{{isNormalOrError_}}">
${this.isNormalOrError_ ? html`
- <div class="drag-drop-title-container">
- <div class="drag-drop-title-container">
+ <!-- <div class="drag-drop-title-container">
+ <!-- <div class="drag-drop-title-container">
<div id="dragDropIllustration"></div>
<div id="dragDropIllustration"></div>
<div class="drag-drop-title">
<div class="drag-drop-title">
<span id="dragText">$i18n{lensSearchUploadDialogDragTitle}</span>
<span id="dragText">$i18n{lensSearchUploadDialogDragTitle}</span>
@@ -3 74,13 +374 ,13 @@
@@ -32,13 +32,13 @@
$i18n{lensSearchUploadDialogUploadFileTitle}
$i18n{lensSearchUploadDialogUploadFileTitle}
</span>
</span>
</div>
</div>
- </div>
- </div>
+ </div>//-->
+ </div>//-->
<div id="urlUploadContainer">
<div id="urlUploadContainer">
- <div id="sectionDivider">
- <div id="sectionDivider">
+ <!-- <div id="sectionDivider">
+ <!-- <div id="sectionDivider">
<div class="divider-line"></div>
<div class="divider-line"></div>
<div id="orLabel">$i18n{lensSearchUploadDialogOrText}</div>
<div id="orLabel">$i18n{lensSearchUploadDialogOrText}</div>
<div class="divider-line"></div>
<div class="divider-line"></div>
- </div>
- </div>
+ </div>//-->
+ </div>//-->
<div id="inputContainer">
<div id="inputContainer">
<input id="inputBox" autocomplete="false" autocorrect="false"
<input id="inputBox" autocomplete="false" autocorrect="false"
placeholder="$i18n{lensSearchUploadDialogTextPlaceholder}"
placeholder="$i18n{lensSearchUploadDialogTextPlaceholder}"
diff --git a/chrome/browser/resources/new_tab_page/logo. html b/chrome/browser/resources/new_tab_page/logo.html
diff --git a/chrome/browser/resources/new_tab_page/logo.css b/chrome/browser/resources/new_tab_page/logo.css
index cef2c8c722..6255bbe479 100644
index f7c8d5c6e4..71e8d5455d 100644
--- a/chrome/browser/resources/new_tab_page/logo. html
--- a/chrome/browser/resources/new_tab_page/logo.css
+++ b/chrome/browser/resources/new_tab_page/logo. html
+++ b/chrome/browser/resources/new_tab_page/logo.css
@@ - 23,10 +2 3,7 @@
@@ -33,10 +33,7 @@
}
}
:host([single-colored]) #logo {
:host([single-colored]) #logo {
- -webkit-mask-image: url(./icons/google_logo.svg);
- -webkit-mask-image: url(./icons/google_logo.svg);
- -webkit-mask-repeat: no-repeat;
- -webkit-mask-repeat: no-repeat;
- -webkit-mask-size: 100%;
- -webkit-mask-size: 100%;
- background-color: var(--ntp-logo-color);
- background-color: var(--ntp-logo-color);
+ background-image: url(./icons/google_logo.svg);
+ background-image: url(./icons/google_logo.svg);
}
}
:host(:not([single-colored])) #logo {
:host(:not([single-colored])) #logo {
diff --git a/chrome/browser/resources/new_tab_page/logo.ts b/chrome/browser/resources/new_tab_page/logo.ts
diff --git a/chrome/browser/resources/new_tab_page/logo.ts b/chrome/browser/resources/new_tab_page/logo.ts
index b6140ec10f..7c3f6e00df 100644
index 412c9bcf2c..e0c27819a5 100644
--- a/chrome/browser/resources/new_tab_page/logo.ts
--- a/chrome/browser/resources/new_tab_page/logo.ts
+++ b/chrome/browser/resources/new_tab_page/logo.ts
+++ b/chrome/browser/resources/new_tab_page/logo.ts
@@ -2 32,7 +232,7 @@ export class LogoElement extends Polymer Element {
@@ -2 16,7 +216,7 @@ export class LogoElement extends CrLit Element {
}
}
private computeShowLogo_(): boolean {
private computeShowLogo_(): boolean {
@ -315,10 +270,10 @@ index c7ae65114f..5859d72731 100644
bool IsNTPOrRelatedURL(const GURL& url, Profile* profile);
bool IsNTPOrRelatedURL(const GURL& url, Profile* profile);
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
index 552058b069..34ebdde320 100644
index b3304b0757..33e6a2fd41 100644
--- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
--- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
+++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
+++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
@@ -3 7,6 +37 ,7 @@
@@ -3 2,6 +32 ,7 @@
#include "chrome/browser/search/background/ntp_custom_background_service_factory.h"
#include "chrome/browser/search/background/ntp_custom_background_service_factory.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/search_provider_logos/logo_service_factory.h"
#include "chrome/browser/search_provider_logos/logo_service_factory.h"
@ -326,9 +281,9 @@ index 552058b069..34ebdde320 100644
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ - 679,6 +680 ,10 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) {
@@ - 421,6 +422 ,10 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) {
base::FeatureList::IsEnabled(
ntp_features::kNtpChromeCartInHistoryClusterModule) );
source->AddBoolean("modulesRedesignedEnabled", redesigned_modules_enabled );
+ source->AddBoolean(
+ source->AddBoolean(
+ "googleLensForYandex",
+ "googleLensForYandex",
@ -403,10 +358,10 @@ index d4f6038697..b493d4c587 100644
data->suggestions_url_post_params = s.ColumnString(18);
data->suggestions_url_post_params = s.ColumnString(18);
data->image_url_post_params = s.ColumnString(19);
data->image_url_post_params = s.ColumnString(19);
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
index cdb763081d..d4b06432f2 100644
index 889d15f789..eb41d59f3c 100644
--- a/components/search_engines/prepopulated_engines.json
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -6 65,7 +665 ,7 @@
@@ -6 73,7 +673 ,7 @@
"suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.by/images/search/?rpt=imageview",
"image_url": "https://yandex.by/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
@ -415,7 +370,7 @@ index cdb763081d..d4b06432f2 100644
"type": "SEARCH_ENGINE_YANDEX",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
"id": 15
},
},
@@ -6 7 8,6 +67 8,7 @@
@@ -6 86 ,6 +686 ,7 @@
"suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5",
"suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5",
"image_url": "https://yandex.com/images/search?rpt=imageview",
"image_url": "https://yandex.com/images/search?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
@ -423,7 +378,7 @@ index cdb763081d..d4b06432f2 100644
"type": "SEARCH_ENGINE_YANDEX",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
"id": 15
},
},
@@ -69 1,7 +692 ,7 @@
@@ -69 9,7 +700 ,7 @@
"suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.kz/images/search/?rpt=imageview",
"image_url": "https://yandex.kz/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
@ -432,7 +387,7 @@ index cdb763081d..d4b06432f2 100644
"type": "SEARCH_ENGINE_YANDEX",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
"id": 15
},
},
@@ -7 05,7 +706 ,7 @@
@@ -7 13,7 +714 ,7 @@
"suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.ru/images/search/?rpt=imageview",
"image_url": "https://yandex.ru/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
@ -441,7 +396,7 @@ index cdb763081d..d4b06432f2 100644
"type": "SEARCH_ENGINE_YANDEX",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
"id": 15
},
},
@@ -7 18,7 +719 ,7 @@
@@ -7 26,7 +727 ,7 @@
"suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview",
"image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
@ -450,7 +405,7 @@ index cdb763081d..d4b06432f2 100644
"type": "SEARCH_ENGINE_YANDEX",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
"id": 15
},
},
@@ -7 32,7 +733 ,7 @@
@@ -7 40,7 +741 ,7 @@
"suggest_url": "https://suggest.yandex.ua/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"suggest_url": "https://suggest.yandex.ua/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.ua/images/search/?rpt=imageview",
"image_url": "https://yandex.ua/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
@ -513,7 +468,7 @@ index 6c8ffb9e7d..417cb0009c 100644
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &duckduckgo},
{SearchEngineTier::kTopEngines, &duckduckgo},
diff --git a/components/search_engines/template_url_data_util.cc b/components/search_engines/template_url_data_util.cc
diff --git a/components/search_engines/template_url_data_util.cc b/components/search_engines/template_url_data_util.cc
index 6f85515188.. 7791bf8113 100644
index 6f85515188.. 0657dc9d5a 100644
--- a/components/search_engines/template_url_data_util.cc
--- a/components/search_engines/template_url_data_util.cc
+++ b/components/search_engines/template_url_data_util.cc
+++ b/components/search_engines/template_url_data_util.cc
@@ -75,10 +75,12 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromDictionary(
@@ -75,10 +75,12 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromDictionary(
@ -534,7 +489,7 @@ index 6f85515188..7791bf8113 100644
ToStringPiece(engine.image_url),
ToStringPiece(engine.image_url),
ToStringPiece(engine.image_translate_url),
ToStringPiece(engine.image_translate_url),
- ToStringPiece(engine.new_tab_url),
- ToStringPiece(engine.new_tab_url),
+ base::StringPiece( ), //ToStringPiece(engine.new_tab_url),
+ ToStringPiece(nullptr ), //ToStringPiece(engine.new_tab_url),
ToStringPiece(engine.contextual_search_url),
ToStringPiece(engine.contextual_search_url),
ToStringPiece(engine.logo_url), ToStringPiece(engine.doodle_url),
ToStringPiece(engine.logo_url), ToStringPiece(engine.doodle_url),
ToStringPiece(engine.search_url_post_params),
ToStringPiece(engine.search_url_post_params),
@ -552,7 +507,7 @@ index 6f85515188..7791bf8113 100644
if (string_value) {
if (string_value) {
contextual_search_url = *string_value;
contextual_search_url = *string_value;
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
index 3a7798c2d1..60959c3e24 100644
index 964626cc24..d4d09dc1bd 100644
--- a/components/search_engines/template_url_prepopulate_data.cc
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -81,6 +81,13 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
@@ -81,6 +81,13 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
@ -569,7 +524,7 @@ index 3a7798c2d1..60959c3e24 100644
return t_urls;
return t_urls;
}
}
@@ -32 5,7 +332 ,7 @@ std::unique_ptr<TemplateURLData> GetPrepopulatedFallbackSearch(
@@ -32 3,7 +330 ,7 @@ std::unique_ptr<TemplateURLData> GetPrepopulatedFallbackSearch(
PrefService* prefs,
PrefService* prefs,
search_engines::SearchEngineChoiceService* search_engine_choice_service) {
search_engines::SearchEngineChoiceService* search_engine_choice_service) {
return FindPrepopulatedEngineInternal(prefs, search_engine_choice_service,
return FindPrepopulatedEngineInternal(prefs, search_engine_choice_service,
@ -579,7 +534,7 @@ index 3a7798c2d1..60959c3e24 100644
}
}
diff --git a/ui/webui/resources/cr_components/searchbox/realbox.html b/ui/webui/resources/cr_components/searchbox/realbox.html
diff --git a/ui/webui/resources/cr_components/searchbox/realbox.html b/ui/webui/resources/cr_components/searchbox/realbox.html
index aab1bb1034..4ff6b1f282 100644
index 6dce798dcc..0f6ee046fb 100644
--- a/ui/webui/resources/cr_components/searchbox/realbox.html
--- a/ui/webui/resources/cr_components/searchbox/realbox.html
+++ b/ui/webui/resources/cr_components/searchbox/realbox.html
+++ b/ui/webui/resources/cr_components/searchbox/realbox.html
@@ -1,4 +1,11 @@
@@ -1,4 +1,11 @@
@ -595,5 +550,5 @@ index aab1bb1034..4ff6b1f282 100644
/* Embedders should define --cr-realbox-min-width. */
/* Embedders should define --cr-realbox-min-width. */
--cr-realbox-shadow: 0 1px 6px 0 var(--color-realbox-shadow);
--cr-realbox-shadow: 0 1px 6px 0 var(--color-realbox-shadow);
--
--
2.45.2
2.46.0