mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ebb0cb88e4 | |||
| 71cd486eaf | |||
| bf26fa3e96 | |||
| e1f2182e90 | |||
| 058dbdb229 | |||
| c9a7f5b1b3 | |||
| 1d5f225b08 | |||
| d9213991cc | |||
| a6484f3d3f | |||
| 6271d50506 |
@@ -0,0 +1,39 @@
|
||||
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -2216,7 +2216,6 @@ void RenderViewContextMenu::AppendPageIt
|
||||
IDS_CONTENT_CONTEXT_SAVEPAGEAS);
|
||||
menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
|
||||
AppendLiveCaptionItem();
|
||||
- AppendMediaRouterItem();
|
||||
if (IsRegionSearchEnabled()) {
|
||||
AppendRegionSearchItem();
|
||||
}
|
||||
@@ -2344,8 +2343,7 @@ void RenderViewContextMenu::AppendMediaR
|
||||
|
||||
void RenderViewContextMenu::AppendReadingModeItem() {
|
||||
// Show Read Anything option if it's not already open in the side panel.
|
||||
- if (GetBrowser() && GetBrowser()->is_type_normal() &&
|
||||
- !IsReadAnythingEntryShowing(GetBrowser())) {
|
||||
+ if ((false)) {
|
||||
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_OPEN_IN_READING_MODE,
|
||||
IDS_CONTENT_CONTEXT_READING_MODE);
|
||||
}
|
||||
@@ -3976,6 +3974,8 @@ bool RenderViewContextMenu::IsVideoFrame
|
||||
bool RenderViewContextMenu::AppendQRCodeGeneratorItem(bool for_image,
|
||||
bool draw_icon,
|
||||
bool add_separator) {
|
||||
+ return false;
|
||||
+
|
||||
if (!IsQRCodeGeneratorEnabled()) {
|
||||
return false;
|
||||
}
|
||||
--- a/chrome/browser/ui/browser_tab_strip_model_delegate.cc
|
||||
+++ b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
|
||||
@@ -304,6 +304,7 @@ void BrowserTabStripModelDelegate::AddTo
|
||||
}
|
||||
|
||||
bool BrowserTabStripModelDelegate::SupportsReadLater() {
|
||||
+ return false;
|
||||
return !browser_->profile()->IsGuestSession() && !IsForWebApp();
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -2344,8 +2344,7 @@ void RenderViewContextMenu::AppendMediaR
|
||||
|
||||
void RenderViewContextMenu::AppendReadingModeItem() {
|
||||
// Show Read Anything option if it's not already open in the side panel.
|
||||
- if (GetBrowser() && GetBrowser()->is_type_normal() &&
|
||||
- !IsReadAnythingEntryShowing(GetBrowser())) {
|
||||
+ if ((false)) {
|
||||
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_OPEN_IN_READING_MODE,
|
||||
IDS_CONTENT_CONTEXT_READING_MODE);
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -131,7 +131,7 @@ BASE_FEATURE(KScrimForTabModal,
|
||||
"ScrimForTabModal",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
-BASE_FEATURE(kSideBySide, "SideBySide", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kSideBySide, "SideBySide", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kSidePanelResizing,
|
||||
"SidePanelResizing",
|
||||
--- a/chrome/browser/ui/views/frame/multi_contents_resize_area.cc
|
||||
+++ b/chrome/browser/ui/views/frame/multi_contents_resize_area.cc
|
||||
@@ -21,8 +21,8 @@
|
||||
namespace {
|
||||
const int kHandleCornerRadius = 2;
|
||||
const int kHandleHeight = 24;
|
||||
-const int kHandlePadding = 6;
|
||||
-const int kHandleWidth = 4;
|
||||
+const int kHandlePadding = 3;
|
||||
+const int kHandleWidth = 2;
|
||||
} // namespace
|
||||
|
||||
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(MultiContentsResizeHandle,
|
||||
--- a/chrome/browser/ui/views/frame/multi_contents_view.h
|
||||
+++ b/chrome/browser/ui/views/frame/multi_contents_view.h
|
||||
@@ -126,11 +126,11 @@ class MultiContentsView : public views::
|
||||
private:
|
||||
static constexpr int kMinWebContentsWidth = 200;
|
||||
static constexpr double kMinWebContentsWidthPercentage = 0.1;
|
||||
- static constexpr int kContentCornerRadius = 6;
|
||||
+ static constexpr int kContentCornerRadius = 5;
|
||||
static constexpr int kContentOutlineCornerRadius = 8;
|
||||
static constexpr int kContentOutlineThickness = 1;
|
||||
- static constexpr int kSplitViewContentInset = 8;
|
||||
- static constexpr int kSplitViewContentPadding = 4;
|
||||
+ static constexpr int kSplitViewContentInset = 3;
|
||||
+ static constexpr int kSplitViewContentPadding = 2;
|
||||
|
||||
// ContentsContainerView holds the ContentsWebView and the outlines and
|
||||
// minitoolbar when in split view.
|
||||
--- a/chrome/browser/resources/tab_search/split_view/app.css
|
||||
+++ b/chrome/browser/resources/tab_search/split_view/app.css
|
||||
@@ -27,6 +27,7 @@
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
margin-top: 4px;
|
||||
+ color: var(--cr-secondary-text-color);
|
||||
}
|
||||
|
||||
.contents {
|
||||
--- a/chrome/browser/ui/tabs/split_tab_menu_model.cc
|
||||
+++ b/chrome/browser/ui/tabs/split_tab_menu_model.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
#include "chrome/browser/ui/tabs/split_tab_data.h"
|
||||
#include "chrome/browser/ui/tabs/split_tab_visual_data.h"
|
||||
+#include "chrome/browser/ui/tabs/tab_enums.h"
|
||||
#include "chrome/browser/ui/tabs/tab_model.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
@@ -23,12 +24,10 @@
|
||||
#include "ui/menus/simple_menu_model.h"
|
||||
|
||||
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(SplitTabMenuModel, kSwapPositionMenuItem);
|
||||
-DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(SplitTabMenuModel, kSwapLayoutMenuItem);
|
||||
|
||||
SplitTabMenuModel::SplitTabMenuModel(TabStripModel* tab_strip_model)
|
||||
: ui::SimpleMenuModel(this), tab_strip_model_(tab_strip_model) {
|
||||
AddItem(static_cast<int>(CommandId::kSwapPosition), std::u16string());
|
||||
- AddItem(static_cast<int>(CommandId::kSwapLayout), std::u16string());
|
||||
AddSeparator(ui::MenuSeparatorType::NORMAL_SEPARATOR);
|
||||
AddItemWithStringIdAndIcon(
|
||||
static_cast<int>(CommandId::kClose), IDS_SPLIT_TAB_CLOSE,
|
||||
@@ -43,9 +42,6 @@ SplitTabMenuModel::SplitTabMenuModel(Tab
|
||||
SetElementIdentifierAt(
|
||||
GetIndexOfCommandId(static_cast<int>(CommandId::kSwapPosition)).value(),
|
||||
kSwapPositionMenuItem);
|
||||
- SetElementIdentifierAt(
|
||||
- GetIndexOfCommandId(static_cast<int>(CommandId::kSwapLayout)).value(),
|
||||
- kSwapLayoutMenuItem);
|
||||
}
|
||||
|
||||
SplitTabMenuModel::~SplitTabMenuModel() = default;
|
||||
@@ -86,7 +82,32 @@ ui::ImageModel SplitTabMenuModel::GetIco
|
||||
ui::SimpleMenuModel::kDefaultIconSize);
|
||||
}
|
||||
|
||||
-void SplitTabMenuModel::ExecuteCommand(int command_id, int event_flags) {}
|
||||
+void SplitTabMenuModel::ExecuteCommand(int command_id, int event_flags) {
|
||||
+ split_tabs::SplitTabId split_id = GetSplitTabId();
|
||||
+ switch (static_cast<CommandId>(command_id)) {
|
||||
+ case CommandId::kSwapPosition:
|
||||
+ tab_strip_model_->SwapTabsInSplit(split_id);
|
||||
+ break;
|
||||
+ case CommandId::kClose:
|
||||
+ tab_strip_model_->CloseWebContentsAt(
|
||||
+ tab_strip_model_->active_index(),
|
||||
+ TabCloseTypes::CLOSE_USER_GESTURE |
|
||||
+ TabCloseTypes::CLOSE_CREATE_HISTORICAL_TAB);
|
||||
+ break;
|
||||
+ case CommandId::kExitSplit:
|
||||
+ tab_strip_model_->RemoveSplit(split_id);
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+split_tabs::SplitTabId SplitTabMenuModel::GetSplitTabId() const {
|
||||
+ tabs::TabInterface* const tab =
|
||||
+ split_tab_index_.has_value()
|
||||
+ ? tab_strip_model_->GetTabAtIndex(split_tab_index_.value())
|
||||
+ : tab_strip_model_->GetActiveTab();
|
||||
+ CHECK(tab->IsSplit());
|
||||
+ return tab->GetSplit().value();
|
||||
+}
|
||||
|
||||
const gfx::VectorIcon& SplitTabMenuModel::GetSwapPositionIcon(
|
||||
split_tabs::SplitTabActiveLocation active_split_tab_location) const {
|
||||
--- a/chrome/browser/ui/tabs/split_tab_menu_model.h
|
||||
+++ b/chrome/browser/ui/tabs/split_tab_menu_model.h
|
||||
@@ -40,6 +40,7 @@ class SplitTabMenuModel : public ui::Sim
|
||||
void ExecuteCommand(int command_id, int event_flags) override;
|
||||
|
||||
private:
|
||||
+ split_tabs::SplitTabId GetSplitTabId() const;
|
||||
const gfx::VectorIcon& GetSwapPositionIcon(
|
||||
split_tabs::SplitTabActiveLocation active_split_tab_location) const;
|
||||
const gfx::VectorIcon& GetSwapLayoutIcon(
|
||||
@@ -47,6 +48,10 @@ class SplitTabMenuModel : public ui::Sim
|
||||
std::u16string GetSwapLayoutString() const;
|
||||
|
||||
raw_ptr<TabStripModel> tab_strip_model_ = nullptr;
|
||||
+
|
||||
+ // This represents the tab that this menu model should be operating on. If
|
||||
+ // nothing is provided, use the currently active tab.
|
||||
+ std::optional<int> split_tab_index_;
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_UI_TABS_SPLIT_TAB_MENU_MODEL_H_
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
|
||||
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.h
|
||||
@@ -11,7 +11,7 @@ class ToolbarButton;
|
||||
class ToolbarButtonProvider;
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
-constexpr int kWebAppMenuMargin = 7;
|
||||
+constexpr int kWebAppMenuMargin = 4;
|
||||
#endif
|
||||
|
||||
// Makes adjustments to |toolbar_button| for display in a web app frame.
|
||||
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
|
||||
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.cc
|
||||
@@ -85,7 +85,7 @@ WebAppToolbarButtonContainer::WebAppTool
|
||||
.SetDefault(
|
||||
views::kMarginsKey,
|
||||
gfx::Insets::VH(
|
||||
- 0, HorizontalPaddingBetweenPageActionsAndAppMenuButtons()))
|
||||
+ 0, 9))
|
||||
.SetCollapseMargins(true)
|
||||
.SetIgnoreDefaultMainAxisMargins(true)
|
||||
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
@@ -56,7 +56,7 @@
|
||||
case TAB_SEPARATOR_HEIGHT:
|
||||
return touch_ui ? 24 : 20;
|
||||
case TAB_PRE_TITLE_PADDING:
|
||||
@@ -110,14 +110,9 @@ int GetLayoutConstant(LayoutConstant con
|
||||
@@ -110,28 +110,23 @@ int GetLayoutConstant(LayoutConstant con
|
||||
case TAB_STACK_DISTANCE:
|
||||
return touch_ui ? 4 : 6;
|
||||
case TABSTRIP_TOOLBAR_OVERLAP:
|
||||
@@ -73,20 +73,22 @@
|
||||
case TOOLBAR_DIVIDER_CORNER_RADIUS:
|
||||
return 1;
|
||||
case TOOLBAR_DIVIDER_HEIGHT:
|
||||
@@ -125,13 +120,13 @@ int GetLayoutConstant(LayoutConstant con
|
||||
return touch_ui ? 20 : 16;
|
||||
case TOOLBAR_DIVIDER_SPACING:
|
||||
return 9;
|
||||
- return 9;
|
||||
+ return 6;
|
||||
case TOOLBAR_DIVIDER_WIDTH:
|
||||
- return 2;
|
||||
+ return 1;
|
||||
case TOOLBAR_ELEMENT_PADDING:
|
||||
return touch_ui ? 0 : 4;
|
||||
- return touch_ui ? 0 : 4;
|
||||
+ return touch_ui ? 0 : 3;
|
||||
case TOOLBAR_ICON_DEFAULT_MARGIN:
|
||||
- return touch_ui ? 0 : 2;
|
||||
+ return touch_ui ? 0 : 4;
|
||||
+ return touch_ui ? 0 : 3;
|
||||
case TOOLBAR_STANDARD_SPACING:
|
||||
- return touch_ui ? 12 : 9;
|
||||
+ return touch_ui ? 12 : 8;
|
||||
+ return touch_ui ? 12 : 6;
|
||||
case PAGE_INFO_ICON_SIZE:
|
||||
return 20;
|
||||
case DOWNLOAD_ICON_SIZE:
|
||||
@@ -122,7 +124,7 @@
|
||||
|
||||
case TOOLBAR_INTERIOR_MARGIN:
|
||||
- return touch_ui ? gfx::Insets() : gfx::Insets::VH(6, 5);
|
||||
+ return touch_ui ? gfx::Insets() : gfx::Insets::VH(3, 8);
|
||||
+ return touch_ui ? gfx::Insets() : gfx::Insets::VH(3, 6);
|
||||
|
||||
case WEBUI_TAB_STRIP_TOOLBAR_INTERIOR_MARGIN:
|
||||
return gfx::Insets::VH(4, 0);
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
|
||||
@@ -76,7 +76,7 @@ class FrameGrabHandle : public views::Vi
|
||||
// is full.
|
||||
// TODO(tbergquist): Define this relative to the NTB insets again.
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch("remove-grab-handle")) return gfx::Size(0, 0);
|
||||
- return gfx::Size(42, 0);
|
||||
+ return gfx::Size(29, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
// Thickness in DIPs of the separator painted on the left and right edges of
|
||||
// the tab.
|
||||
-constexpr int kChromeRefreshSeparatorThickness = 2;
|
||||
-constexpr int kChromeRefreshSeparatorHorizontalMargin = 2;
|
||||
+constexpr int kChromeRefreshSeparatorThickness = 1;
|
||||
constexpr int kChromeRefreshSeparatorHorizontalMargin = 2;
|
||||
+constexpr int kChromeRefreshSeparatorHorizontalMargin = 1;
|
||||
// TODO (crbug.com/1451400): This constant should be in LayoutConstants.
|
||||
constexpr int kChromeRefreshSeparatorHeight = 16;
|
||||
|
||||
|
||||
+4
-1
@@ -135,13 +135,14 @@ helium/core/update-credits.patch
|
||||
helium/core/disable-user-education-nags.patch
|
||||
helium/core/replace-default-profile-name.patch
|
||||
helium/core/disable-live-caption-completely.patch
|
||||
helium/core/remove-read-anything-context-menu-entry.patch
|
||||
helium/core/unthemify-onboarding-favicon.patch
|
||||
helium/core/spoof-extension-downloader-platform.patch
|
||||
helium/core/add-helium-versioning.patch
|
||||
helium/core/enable-tab-search-toolbar-button.patch
|
||||
helium/core/hide-avatar-via-toolbar-prefs.patch
|
||||
helium/core/hide-extensions-via-toolbar-prefs.patch
|
||||
helium/core/clean-context-menu.patch
|
||||
helium/core/split-view.patch
|
||||
|
||||
helium/settings/move-search-suggest.patch
|
||||
helium/settings/remove-autofill.patch
|
||||
@@ -194,3 +195,5 @@ helium/ui/bangs-ui.patch
|
||||
helium/ui/thinner-infobar.patch
|
||||
helium/ui/reduce-text-button-height.patch
|
||||
helium/ui/fix-omnibox-tabs-icon.patch
|
||||
helium/ui/smaller-window-grab-handle.patch
|
||||
helium/ui/fix-pwa-toolbar.patch
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2
|
||||
4
|
||||
|
||||
Reference in New Issue
Block a user