patches: refresh for chromium 151.0.7922.169

This commit is contained in:
wukko
2026-08-20 00:48:04 +06:00
parent 4c778fcf49
commit d2fae0fde2
3 changed files with 28 additions and 25 deletions
+21 -18
View File
@@ -18,26 +18,29 @@
if (editable) {
AppendOtherEditableItems();
}
@@ -2473,46 +2462,6 @@ void RenderViewContextMenu::AppendPageIt
@@ -2484,49 +2473,6 @@ void RenderViewContextMenu::AppendPageIt
IDS_CONTENT_CONTEXT_SAVEPAGEAS);
menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
- AppendLiveCaptionItem();
- menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
-
- // Ask gemini
- size_t count_before = menu_model_.GetItemCount();
- MaybeAppendOpenGlicItem();
- // Remove separator to group with Lens
- if (menu_model_.GetItemCount() > count_before &&
- menu_model_.GetTypeAt(menu_model_.GetItemCount() - 1) ==
- ui::MenuModel::TYPE_SEPARATOR) {
- menu_model_.RemoveItemAt(menu_model_.GetItemCount() - 1);
- }
- if (!glic_below_search) {
- // Ask gemini
- MaybeAppendOpenGlicItem(/*add_separator=*/false);
-
- // Search with google lens
- if (IsRegionSearchEnabled()) {
- AppendRegionSearchItem();
- // Search with google lens
- if (IsRegionSearchEnabled()) {
- AppendRegionSearchItem();
- }
- } else {
- // Search with google lens
- if (IsRegionSearchEnabled()) {
- AppendRegionSearchItem();
- }
-
- // Ask gemini
- MaybeAppendOpenGlicItem(/*add_separator=*/false);
- }
-
- // Open in reading mode & Listen to this page
@@ -65,7 +68,7 @@
menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
return;
}
@@ -2528,7 +2477,6 @@ void RenderViewContextMenu::AppendPageIt
@@ -2544,7 +2490,6 @@ void RenderViewContextMenu::AppendPageIt
IDS_CONTENT_CONTEXT_SAVEPAGEAS);
menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
AppendLiveCaptionItem();
@@ -73,7 +76,7 @@
if (features::IsReadAnythingMenuShuffleExperimentEnabled()) {
// This will be set to false in AppendRegionSearchItem() if it is called.
@@ -2742,7 +2690,7 @@ void RenderViewContextMenu::AppendReadAn
@@ -2764,7 +2709,7 @@ void RenderViewContextMenu::AppendReadAn
}
// Show Read Anything option if it's not already open in the side panel.
@@ -82,7 +85,7 @@
std::u16string label;
const std::u16string printable_selection_text = PrintableSelectionText();
if (is_menu_simplification_enabled && !printable_selection_text.empty()) {
@@ -4144,30 +4092,9 @@ void RenderViewContextMenu::ExecuteComma
@@ -4178,30 +4123,9 @@ void RenderViewContextMenu::ExecuteComma
}
}
@@ -115,7 +118,7 @@
// static
void RenderViewContextMenu::RegisterMenuShownCallbackForTesting(
@@ -4549,7 +4476,7 @@ bool RenderViewContextMenu::AppendQRCode
@@ -4583,7 +4507,7 @@ bool RenderViewContextMenu::AppendQRCode
return false;
}
@@ -124,7 +127,7 @@
return false;
}
@@ -5635,19 +5562,11 @@ ToastController* RenderViewContextMenu::
@@ -5669,19 +5593,11 @@ ToastController* RenderViewContextMenu::
}
bool RenderViewContextMenu::CanTranslate(bool menu_logging) {
+3 -3
View File
@@ -56,7 +56,7 @@
// LINT.ThenChange(//tools/metrics/histograms/metadata/ui/enums.xml:RenderViewContextMenuItem)
// LINT.IfChange(ContextMenuOptionDesktop)
@@ -2933,6 +2934,8 @@ void RenderViewContextMenu::AppendOtherE
@@ -2957,6 +2958,8 @@ void RenderViewContextMenu::AppendOtherE
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE,
IDS_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE);
}
@@ -65,7 +65,7 @@
#if BUILDFLAG(IS_CHROMEOS)
// Insert a submenu of clipboard history descriptors.
@@ -3403,6 +3406,7 @@ bool RenderViewContextMenu::IsCommandIdE
@@ -3434,6 +3437,7 @@ bool RenderViewContextMenu::IsCommandIdE
return IsPasteEnabled();
case IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE:
@@ -73,7 +73,7 @@
return IsPasteAndMatchStyleEnabled();
case IDC_CONTENT_CONTEXT_DELETE:
@@ -3976,6 +3980,10 @@ void RenderViewContextMenu::ExecuteComma
@@ -4007,6 +4011,10 @@ void RenderViewContextMenu::ExecuteComma
source_web_contents_->PasteAndMatchStyle();
break;
@@ -22,7 +22,7 @@
</message>
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -2057,11 +2057,13 @@ void RenderViewContextMenu::AppendLinkIt
@@ -2065,11 +2065,13 @@ void RenderViewContextMenu::AppendLinkIt
AppendClickToCallItem();
menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
@@ -38,7 +38,7 @@
if (params_.source_type == ui::mojom::MenuSourceType::kTouch &&
params_.media_type != ContextMenuDataMediaType::kImage &&
!params_.link_text.empty()) {
@@ -2468,8 +2470,12 @@ void RenderViewContextMenu::AppendPageIt
@@ -2479,8 +2481,12 @@ void RenderViewContextMenu::AppendPageIt
const bool use_simplified_text_selection = ShouldUseSimplifiedTextSelection();
@@ -52,8 +52,8 @@
+ }
menu_model_.AddItemWithStringId(IDC_RELOAD, IDS_CONTENT_CONTEXT_RELOAD);
menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
MaybeAppendOpenGlicItem();
@@ -2809,9 +2815,8 @@ void RenderViewContextMenu::AppendSearch
if (!glic_below_search) {
@@ -2828,9 +2834,8 @@ void RenderViewContextMenu::AppendSearch
GetBrowser() || IsPrintPreviewContent(current_url_)) {
menu_model_.AddItem(
IDC_CONTENT_CONTEXT_SEARCHWEBFOR,