From b835aad0afccf5eabe53f9fcecddb0a44f547022 Mon Sep 17 00:00:00 2001 From: Blaise Date: Sun, 30 May 2021 10:41:40 -0500 Subject: [PATCH 01/11] Version 91 updates --- tweaks/shortcuts/macos-hotkeys-on-linux.patch | 80 ++++++++----------- tweaks/visual/overlay-scrollbar-opacity.patch | 2 +- ...bbar-toolbar-bookmarkbar-downloadbar.patch | 55 ++++++------- 3 files changed, 59 insertions(+), 78 deletions(-) diff --git a/tweaks/shortcuts/macos-hotkeys-on-linux.patch b/tweaks/shortcuts/macos-hotkeys-on-linux.patch index 95eed21..9aa56f8 100644 --- a/tweaks/shortcuts/macos-hotkeys-on-linux.patch +++ b/tweaks/shortcuts/macos-hotkeys-on-linux.patch @@ -1,10 +1,8 @@ -# Working patch for Portage Overlay pf4public www-client/ungoogled-chromium-88.0.4324.150-r2 +# Working patch for Portage Overlay pf4public www-client/ungoogled-chromium # Copy to /etc/portage/patches/www-client/ungoogled-chromium/ and emerge like normal -diff --git a/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc b/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -index 234cb7afe1..d3f598278f 100644 --- a/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc +++ b/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -@@ -140,39 +140,39 @@ bool RenderViewContextMenuViews::GetAcceleratorForCommandId( +@@ -144,39 +144,39 @@ bool RenderViewContextMenuViews::GetAcce return true; case IDC_CONTENT_CONTEXT_UNDO: @@ -52,7 +50,7 @@ index 234cb7afe1..d3f598278f 100644 return true; case IDC_CONTENT_CONTEXT_ROTATECCW: -@@ -188,11 +188,11 @@ bool RenderViewContextMenuViews::GetAcceleratorForCommandId( +@@ -192,11 +192,11 @@ bool RenderViewContextMenuViews::GetAcce return true; case IDC_PRINT: @@ -66,11 +64,9 @@ index 234cb7afe1..d3f598278f 100644 return true; case IDC_CONTENT_CONTEXT_SAVEAVAS: -diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc -index 4732019d47..aa07642f40 100644 --- a/chrome/common/extensions/command.cc +++ b/chrome/common/extensions/command.cc -@@ -103,7 +103,7 @@ ui::Accelerator ParseImpl(const std::string& accelerator, +@@ -104,7 +104,7 @@ ui::Accelerator ParseImpl(const std::str // Mac the developer has to specify MacCtrl). Therefore we treat this // as Command. modifiers |= ui::EF_COMMAND_DOWN; @@ -79,11 +75,9 @@ index 4732019d47..aa07642f40 100644 } else if (platform_key == values::kKeybindingPlatformDefault) { // If we see "Command+foo" in the Default section it can mean two // things, depending on the platform: -diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc -index 9692196ee8..12dcbd57e3 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc -@@ -1434,7 +1434,7 @@ void PepperPluginInstanceImpl::SelectAll() { +@@ -1437,7 +1437,7 @@ void PepperPluginInstanceImpl::SelectAll // TODO(https://crbug.com/836074) |kPlatformModifier| should be // |ui::EF_PLATFORM_ACCELERATOR| (|ui::EF_COMMAND_DOWN| on Mac). @@ -92,11 +86,9 @@ index 9692196ee8..12dcbd57e3 100644 // Synthesize a ctrl + a key event to send to the plugin and let it sort out // the event. See also https://crbug.com/739529. ui::KeyEvent char_event(L'A', ui::VKEY_A, ui::DomCode::NONE, -diff --git a/third_party/blink/renderer/core/editing/editing_behavior.cc b/third_party/blink/renderer/core/editing/editing_behavior.cc -index 0bfbf2d335..b2060a134f 100644 --- a/third_party/blink/renderer/core/editing/editing_behavior.cc +++ b/third_party/blink/renderer/core/editing/editing_behavior.cc -@@ -45,7 +45,7 @@ const unsigned kCtrlKey = WebInputEvent::kControlKey; +@@ -45,7 +45,7 @@ const unsigned kCtrlKey = WebInputEvent: const unsigned kAltKey = WebInputEvent::kAltKey; const unsigned kShiftKey = WebInputEvent::kShiftKey; const unsigned kMetaKey = WebInputEvent::kMetaKey; @@ -114,7 +106,7 @@ index 0bfbf2d335..b2060a134f 100644 {VKEY_LEFT, kOptionKey, "MoveWordLeft"}, {VKEY_LEFT, kOptionKey | kShiftKey, "MoveWordLeftAndModifySelection"}, #else -@@ -97,7 +97,7 @@ const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEntries[] = { +@@ -97,7 +97,7 @@ const KeyboardCodeKeyDownEntry kKeyboard #endif {VKEY_RIGHT, 0, "MoveRight"}, {VKEY_RIGHT, kShiftKey, "MoveRightAndModifySelection"}, @@ -123,7 +115,7 @@ index 0bfbf2d335..b2060a134f 100644 {VKEY_RIGHT, kOptionKey, "MoveWordRight"}, {VKEY_RIGHT, kOptionKey | kShiftKey, "MoveWordRightAndModifySelection"}, #else -@@ -110,7 +110,7 @@ const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEntries[] = { +@@ -110,7 +110,7 @@ const KeyboardCodeKeyDownEntry kKeyboard {VKEY_DOWN, 0, "MoveDown"}, {VKEY_DOWN, kShiftKey, "MoveDownAndModifySelection"}, {VKEY_NEXT, kShiftKey, "MovePageDownAndModifySelection"}, @@ -132,7 +124,7 @@ index 0bfbf2d335..b2060a134f 100644 {VKEY_UP, kCtrlKey, "MoveParagraphBackward"}, {VKEY_UP, kCtrlKey | kShiftKey, "MoveParagraphBackwardAndModifySelection"}, {VKEY_DOWN, kCtrlKey, "MoveParagraphForward"}, -@@ -120,18 +120,18 @@ const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEntries[] = { +@@ -120,18 +120,18 @@ const KeyboardCodeKeyDownEntry kKeyboard #endif {VKEY_HOME, 0, "MoveToBeginningOfLine"}, {VKEY_HOME, kShiftKey, "MoveToBeginningOfLineAndModifySelection"}, @@ -154,7 +146,7 @@ index 0bfbf2d335..b2060a134f 100644 {VKEY_END, kCtrlKey, "MoveToEndOfDocument"}, {VKEY_END, kCtrlKey | kShiftKey, "MoveToEndOfDocumentAndModifySelection"}, #endif -@@ -145,7 +145,7 @@ const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEntries[] = { +@@ -145,7 +145,7 @@ const KeyboardCodeKeyDownEntry kKeyboard {VKEY_BACK, kCtrlKey, "DeleteWordBackward"}, {VKEY_DELETE, kCtrlKey, "DeleteWordForward"}, #endif @@ -163,7 +155,7 @@ index 0bfbf2d335..b2060a134f 100644 {'B', kCommandKey, "ToggleBold"}, {'I', kCommandKey, "ToggleItalic"}, #else -@@ -168,14 +168,14 @@ const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEntries[] = { +@@ -168,14 +168,14 @@ const KeyboardCodeKeyDownEntry kKeyboard #if !defined(OS_MAC) // On OS X, we pipe these back to the browser, so that it can do menu item // blinking. @@ -186,7 +178,7 @@ index 0bfbf2d335..b2060a134f 100644 #endif #if defined(OS_WIN) {VKEY_BACK, kAltKey, "Undo"}, -@@ -274,19 +274,19 @@ bool EditingBehavior::ShouldInsertCharacter(const KeyboardEvent& event) const { +@@ -274,19 +274,19 @@ bool EditingBehavior::ShouldInsertCharac // unexpected behaviour if (ch < ' ') return false; @@ -211,11 +203,9 @@ index 0bfbf2d335..b2060a134f 100644 if (event.metaKey()) return false; #endif -diff --git a/ui/base/window_open_disposition.cc b/ui/base/window_open_disposition.cc -index d90ce70031..32dfebc127 100644 --- a/ui/base/window_open_disposition.cc +++ b/ui/base/window_open_disposition.cc -@@ -17,7 +17,7 @@ WindowOpenDisposition DispositionFromClick( +@@ -17,7 +17,7 @@ WindowOpenDisposition DispositionFromCli bool shift_key, WindowOpenDisposition disposition_for_current_tab) { // MacOS uses meta key (Command key) to spawn new tabs. @@ -224,11 +214,9 @@ index d90ce70031..32dfebc127 100644 if (middle_button || meta_key) #else if (middle_button || ctrl_key) -diff --git a/ui/events/base_event_utils.cc b/ui/events/base_event_utils.cc -index f5c709d2e6..6123022081 100644 --- a/ui/events/base_event_utils.cc +++ b/ui/events/base_event_utils.cc -@@ -22,6 +22,8 @@ const int kSystemKeyModifierMask = EF_ALT_DOWN | EF_COMMAND_DOWN; +@@ -23,6 +23,8 @@ const int kSystemKeyModifierMask = EF_AL #elif defined(OS_APPLE) // Alt modifier is used to input extended characters on Mac. const int kSystemKeyModifierMask = EF_COMMAND_DOWN; @@ -236,9 +224,7 @@ index f5c709d2e6..6123022081 100644 +const int kSystemKeyModifierMask = EF_COMMAND_DOWN; #else const int kSystemKeyModifierMask = EF_ALT_DOWN; - #endif // !defined(OS_CHROMEOS) && !defined(OS_APPLE) -diff --git a/ui/events/event_constants.h b/ui/events/event_constants.h -index bc04d9d67b..58c446d1fe 100644 + #endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !defined(OS_APPLE) --- a/ui/events/event_constants.h +++ b/ui/events/event_constants.h @@ -50,7 +50,9 @@ enum EventFlags { @@ -252,12 +238,23 @@ index bc04d9d67b..58c446d1fe 100644 #endif }; -diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc -index 432332a7fa..b70ae97293 100644 --- a/ui/views/controls/textfield/textfield.cc +++ b/ui/views/controls/textfield/textfield.cc -@@ -130,46 +130,47 @@ ui::TextEditCommand GetCommandForKeyEvent(const ui::KeyEvent& event) { - const bool shift = event.IsShiftDown(); +@@ -253,9 +253,9 @@ Textfield::Textfield() + // These allow BrowserView to pass edit commands from the Chrome menu to us + // when we're focused by simply asking the FocusManager to + // ProcessAccelerator() with the relevant accelerators. +- AddAccelerator(ui::Accelerator(ui::VKEY_X, ui::EF_CONTROL_DOWN)); +- AddAccelerator(ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN)); +- AddAccelerator(ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN)); ++ AddAccelerator(ui::Accelerator(ui::VKEY_X, ui::EF_PLATFORM_ACCELERATOR)); ++ AddAccelerator(ui::Accelerator(ui::VKEY_C, ui::EF_PLATFORM_ACCELERATOR)); ++ AddAccelerator(ui::Accelerator(ui::VKEY_V, ui::EF_PLATFORM_ACCELERATOR)); + #endif + + // Sometimes there are additional ignored views, such as the View representing +@@ -2160,46 +2160,47 @@ ui::TextEditCommand Textfield::GetComman + #endif const bool control = event.IsControlDown() || event.IsCommandDown(); const bool alt = event.IsAltDown() || event.IsAltGrDown(); + const bool command = event.IsCommandDown(); @@ -313,8 +310,8 @@ index 432332a7fa..b70ae97293 100644 + return command ? ui::TextEditCommand::MOVE_WORD_LEFT_AND_MODIFY_SELECTION : ui::TextEditCommand::MOVE_LEFT_AND_MODIFY_SELECTION; case ui::VKEY_HOME: - return shift ? ui::TextEditCommand:: -@@ -207,12 +208,12 @@ ui::TextEditCommand GetCommandForKeyEvent(const ui::KeyEvent& event) { + if (shift) { +@@ -2270,12 +2271,12 @@ ui::TextEditCommand Textfield::GetComman if (shift && control) return ui::TextEditCommand::DELETE_TO_END_OF_LINE; #endif @@ -329,16 +326,3 @@ index 432332a7fa..b70ae97293 100644 return ui::TextEditCommand::COPY; return (shift && !control) ? ui::TextEditCommand::PASTE : ui::TextEditCommand::INVALID_COMMAND; -@@ -354,9 +355,9 @@ Textfield::Textfield() - // These allow BrowserView to pass edit commands from the Chrome menu to us - // when we're focused by simply asking the FocusManager to - // ProcessAccelerator() with the relevant accelerators. -- AddAccelerator(ui::Accelerator(ui::VKEY_X, ui::EF_CONTROL_DOWN)); -- AddAccelerator(ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN)); -- AddAccelerator(ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN)); -+ AddAccelerator(ui::Accelerator(ui::VKEY_X, ui::EF_PLATFORM_ACCELERATOR)); -+ AddAccelerator(ui::Accelerator(ui::VKEY_C, ui::EF_PLATFORM_ACCELERATOR)); -+ AddAccelerator(ui::Accelerator(ui::VKEY_V, ui::EF_PLATFORM_ACCELERATOR)); - #endif - - // Sometimes there are additional ignored views, such as the View representing diff --git a/tweaks/visual/overlay-scrollbar-opacity.patch b/tweaks/visual/overlay-scrollbar-opacity.patch index 5b4a5a3..e20a78f 100644 --- a/tweaks/visual/overlay-scrollbar-opacity.patch +++ b/tweaks/visual/overlay-scrollbar-opacity.patch @@ -9,7 +9,7 @@ --- a/cc/input/scrollbar_animation_controller.cc +++ b/cc/input/scrollbar_animation_controller.cc -@@ -362,6 +362,8 @@ +@@ -364,6 +364,8 @@ void ScrollbarAnimationController::Show( } void ScrollbarAnimationController::ApplyOpacityToScrollbars(float opacity) { diff --git a/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch b/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch index b60886d..07e910d 100644 --- a/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch +++ b/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch @@ -6,29 +6,9 @@ # Their height is based on the height of two rows of text using your current # font, so that could vary depending on your settings. ---- a/chrome/browser/ui/views/download/download_item_view.cc -+++ b/chrome/browser/ui/views/download/download_item_view.cc -@@ -134,7 +134,7 @@ - - // The vertical distance between the item's visual upper bound (as delineated - // by the separator on the right) and the edge of the shelf. --constexpr int kTopBottomPadding = 6; -+constexpr int kTopBottomPadding = 0; - - // The minimum vertical padding above and below contents of the download item. - // This is only used when the text size is large. -@@ -555,7 +555,7 @@ - } - - // The normal height of the item which may be exceeded if text is large. -- constexpr int kDefaultDownloadItemHeight = 48; -+ constexpr int kDefaultDownloadItemHeight = 24; - return gfx::Size(width, std::max(kDefaultDownloadItemHeight, - 2 * kMinimumVerticalPadding + height)); - } --- a/chrome/browser/ui/layout_constants.cc +++ b/chrome/browser/ui/layout_constants.cc -@@ -33,13 +33,13 @@ +@@ -33,13 +33,13 @@ int GetLayoutConstant(LayoutConstant con case BOOKMARK_BAR_HEIGHT: // The fixed margin ensures the bookmark buttons appear centered relative // to the white space above and below. @@ -45,7 +25,7 @@ case WEB_APP_MENU_BUTTON_SIZE: return 24; case WEB_APP_PAGE_ACTION_ICON_SIZE: -@@ -47,18 +47,18 @@ +@@ -47,15 +47,15 @@ int GetLayoutConstant(LayoutConstant con // stretching the container view. return 16; case LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING: @@ -59,15 +39,12 @@ case LOCATION_BAR_ELEMENT_PADDING: return touch_ui ? 3 : 2; case LOCATION_BAR_HEIGHT: - if (OmniboxFieldTrial::RichAutocompletionShowAdditionalText() && - OmniboxFieldTrial::RichAutocompletionTwoLineOmnibox()) - return touch_ui ? 52 : 40; - return touch_ui ? 36 : 28; + return touch_ui ? 36 : 24; case LOCATION_BAR_ICON_SIZE: return touch_ui ? 20 : 16; case TAB_AFTER_TITLE_PADDING: -@@ -68,7 +68,7 @@ +@@ -65,7 +65,7 @@ int GetLayoutConstant(LayoutConstant con case TAB_ALERT_INDICATOR_ICON_WIDTH: return touch_ui ? 12 : 16; case TAB_HEIGHT: @@ -76,8 +53,8 @@ case TAB_PRE_TITLE_PADDING: return 8; case TAB_STACK_DISTANCE: -@@ -76,7 +76,7 @@ - case TABSTRIP_TOOLBAR_OVERLAP: +@@ -79,7 +79,7 @@ int GetLayoutConstant(LayoutConstant con + return 0; return 1; case TOOLBAR_BUTTON_HEIGHT: - return touch_ui ? 48 : 28; @@ -85,7 +62,7 @@ case TOOLBAR_ELEMENT_PADDING: return touch_ui ? 0 : 4; case TOOLBAR_STANDARD_SPACING: -@@ -104,7 +104,7 @@ +@@ -107,7 +107,7 @@ gfx::Insets GetLayoutInsets(LayoutInset } case TOOLBAR_INTERIOR_MARGIN: @@ -94,3 +71,23 @@ } NOTREACHED(); return gfx::Insets(); +--- a/chrome/browser/ui/views/download/download_item_view.cc ++++ b/chrome/browser/ui/views/download/download_item_view.cc +@@ -132,7 +132,7 @@ constexpr int kProgressIndicatorSize = 2 + + // The vertical distance between the item's visual upper bound (as delineated + // by the separator on the right) and the edge of the shelf. +-constexpr int kTopBottomPadding = 6; ++constexpr int kTopBottomPadding = 0; + + // The minimum vertical padding above and below contents of the download item. + // This is only used when the text size is large. +@@ -540,7 +540,7 @@ gfx::Size DownloadItemView::CalculatePre + } + + // The normal height of the item which may be exceeded if text is large. +- constexpr int kDefaultDownloadItemHeight = 48; ++ constexpr int kDefaultDownloadItemHeight = 24; + return gfx::Size(width, std::max(kDefaultDownloadItemHeight, + 2 * kMinimumVerticalPadding + height)); + } From 65d6f06fbd7f9f88b96d4b9b5cfdbd2a34e57d5a Mon Sep 17 00:00:00 2001 From: Blaise Date: Sun, 30 May 2021 12:25:16 -0500 Subject: [PATCH 02/11] New visual patches --- tweaks/visual/hover-status-full-url.patch | 13 ++++++++ .../remove-focusring-from-locationbar.patch | 33 +++++++++++++++++++ tweaks/visual/remove-tab-search-button.patch | 24 ++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 tweaks/visual/hover-status-full-url.patch create mode 100644 tweaks/visual/remove-focusring-from-locationbar.patch create mode 100644 tweaks/visual/remove-tab-search-button.patch diff --git a/tweaks/visual/hover-status-full-url.patch b/tweaks/visual/hover-status-full-url.patch new file mode 100644 index 0000000..f2900df --- /dev/null +++ b/tweaks/visual/hover-status-full-url.patch @@ -0,0 +1,13 @@ +## Always show the full URL in the status bubble when hovering links + +--- a/chrome/browser/ui/status_bubble.h ++++ b/chrome/browser/ui/status_bubble.h +@@ -18,7 +18,7 @@ class GURL; + class StatusBubble { + public: + // On hover, expand status bubble to fit long URL after this delay. +- static const int kExpandHoverDelayMS = 1600; ++ static const int kExpandHoverDelayMS = 0; + + virtual ~StatusBubble() {} + diff --git a/tweaks/visual/remove-focusring-from-locationbar.patch b/tweaks/visual/remove-focusring-from-locationbar.patch new file mode 100644 index 0000000..9f5451a --- /dev/null +++ b/tweaks/visual/remove-focusring-from-locationbar.patch @@ -0,0 +1,33 @@ +## This patch removes the focus ring from the location bar. +# +# Alternatively the color could be changed with focus_ring_->SetColor(SkColor). + +--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc ++++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc +@@ -152,26 +152,6 @@ LocationBarView::LocationBarView(Browser + profile_(profile), + delegate_(delegate), + is_popup_mode_(is_popup_mode) { +- if (!is_popup_mode_) { +- focus_ring_ = views::FocusRing::Install(this); +- focus_ring_->SetHasFocusPredicate([](View* view) -> bool { +- DCHECK(views::IsViewClass(view)); +- auto* v = static_cast(view); +- +- // Show focus ring when the Omnibox is visibly focused and the popup is +- // closed. +- return v->omnibox_view_->model()->is_caret_visible() && +- !v->GetOmniboxPopupView()->IsOpen(); +- }); +- +- focus_ring_->SetPathGenerator( +- std::make_unique()); +- +-#if defined(OS_MAC) +- geolocation_permission_observation_.Observe( +- g_browser_process->platform_part()->location_permission_manager()); +-#endif +- } + } + + LocationBarView::~LocationBarView() = default; diff --git a/tweaks/visual/remove-tab-search-button.patch b/tweaks/visual/remove-tab-search-button.patch new file mode 100644 index 0000000..bea5085 --- /dev/null +++ b/tweaks/visual/remove-tab-search-button.patch @@ -0,0 +1,24 @@ +## This patch removes the tab search button from the tab strip. + +--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc ++++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc +@@ -258,19 +258,6 @@ TabStripRegionView::TabStripRegionView(s + tip_marquee_view_->SetProperty(views::kCrossAxisAlignmentKey, + views::LayoutAlignment::kCenter); + tip_marquee_view_->SetProperty(views::kMarginsKey, control_padding); +- +- const Browser* browser = tab_strip_->controller()->GetBrowser(); +- if (browser && browser->is_type_normal()) { +- auto tab_search_button = std::make_unique(tab_strip_); +- tab_search_button->SetTooltipText( +- l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH)); +- tab_search_button->SetAccessibleName( +- l10n_util::GetStringUTF16(IDS_ACCNAME_TAB_SEARCH)); +- tab_search_button->SetProperty(views::kCrossAxisAlignmentKey, +- views::LayoutAlignment::kCenter); +- tab_search_button_ = AddChildView(std::move(tab_search_button)); +- tab_search_button_->SetProperty(views::kMarginsKey, control_padding); +- } + } + + TabStripRegionView::~TabStripRegionView() = default; From 727ea9e6729b74292afccfee5e6cf327b146aa52 Mon Sep 17 00:00:00 2001 From: Mark Schmitz Date: Wed, 23 Jun 2021 14:09:29 +0100 Subject: [PATCH 03/11] add visual patches to hide or tone down source-indicators for extensions --- ...hide-source-indicator-for-extensions.patch | 19 +++++++ ...btle-source-indicator-for-extensions.patch | 51 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 tweaks/visual/hide-source-indicator-for-extensions.patch create mode 100644 tweaks/visual/subtle-source-indicator-for-extensions.patch diff --git a/tweaks/visual/hide-source-indicator-for-extensions.patch b/tweaks/visual/hide-source-indicator-for-extensions.patch new file mode 100644 index 0000000..9151d07 --- /dev/null +++ b/tweaks/visual/hide-source-indicator-for-extensions.patch @@ -0,0 +1,19 @@ +## This patch hides the badges on the chrome://extensions/ page, +# which show a source-indicator for e.g. "Unpacked extension", +# or "Not from Chrome Web Store." +# See also https://github.com/Eloston/ungoogled-chromium/issues/1552 +# +# When using this patch there is no need to also apply the +# subtle-source-indicator-for-extensions.patch - as no indicator is shown. +## + +--- a/chrome/browser/resources/extensions/item.html.orig ++++ b/chrome/browser/resources/extensions/item.html +@@ -136,6 +136,7 @@ + margin-inline-start: 24px; + margin-top: 24px; + position: absolute; ++ display: none; + } + + .source-icon-wrapper { diff --git a/tweaks/visual/subtle-source-indicator-for-extensions.patch b/tweaks/visual/subtle-source-indicator-for-extensions.patch new file mode 100644 index 0000000..130a8c3 --- /dev/null +++ b/tweaks/visual/subtle-source-indicator-for-extensions.patch @@ -0,0 +1,51 @@ +## This patch changes the source-indicator badges on +# the chrome://extensions/ page to a subtler version. +# See also https://github.com/Eloston/ungoogled-chromium/issues/1552 +# +# When using this patch check that hide-source-indicator-for-extensions.patch +# is __not__ applied - otherwise no indicator is shown. +## + +--- a/chrome/browser/resources/extensions/item.html.orig ++++ b/chrome/browser/resources/extensions/item.html +@@ -133,27 +133,27 @@ + } + + #source-indicator { +- margin-inline-start: 24px; +- margin-top: 24px; + position: absolute; ++ right: -2px; ++ bottom: -2px; + } + + .source-icon-wrapper { +- align-items: center; +- background: rgb(241, 89, 43); /* Same in light & dark modes. */ +- border-radius: 50%; /* 50% border radius === a circle */ +- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.22), +- 0 2px 2px 0 rgba(0, 0, 0, 0.12); + display: flex; +- height: 22px; +- justify-content: center; +- width: 22px; ++ height: 16px; ++ width: 16px; ++ } ++ ++ .source-icon-wrapper[aria-label="Unpacked extension"] { ++ height: 20px; ++ width: 20px; + } + + #source-indicator iron-icon { +- color: white; +- height: 16px; +- width: 16px; ++ color: #777; ++ height: 100%; ++ width: 100%; ++ margin: auto; + } + + paper-tooltip { From 75a3258b7170ffac57bb73e2c0514a30c079e554 Mon Sep 17 00:00:00 2001 From: Blaise Date: Tue, 28 Sep 2021 11:10:29 -0500 Subject: [PATCH 04/11] Update for Chromium 94 --- tweaks/shortcuts/macos-hotkeys-on-linux.patch | 43 ++++++------------- ...hide-source-indicator-for-extensions.patch | 2 +- .../remove-focusring-from-locationbar.patch | 22 ++++------ tweaks/visual/remove-tab-search-button.patch | 24 ----------- ...btle-source-indicator-for-extensions.patch | 5 ++- ...bbar-toolbar-bookmarkbar-downloadbar.patch | 6 +-- 6 files changed, 28 insertions(+), 74 deletions(-) delete mode 100644 tweaks/visual/remove-tab-search-button.patch diff --git a/tweaks/shortcuts/macos-hotkeys-on-linux.patch b/tweaks/shortcuts/macos-hotkeys-on-linux.patch index 9aa56f8..6c61028 100644 --- a/tweaks/shortcuts/macos-hotkeys-on-linux.patch +++ b/tweaks/shortcuts/macos-hotkeys-on-linux.patch @@ -2,7 +2,7 @@ # Copy to /etc/portage/patches/www-client/ungoogled-chromium/ and emerge like normal --- a/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc +++ b/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -@@ -144,39 +144,39 @@ bool RenderViewContextMenuViews::GetAcce +@@ -144,34 +144,34 @@ bool RenderViewContextMenuViews::GetAcce return true; case IDC_CONTENT_CONTEXT_UNDO: @@ -27,12 +27,6 @@ + *accel = ui::Accelerator(ui::VKEY_C, ui::EF_PLATFORM_ACCELERATOR); return true; - case IDC_CONTENT_CONTEXT_INSPECTELEMENT: - *accel = ui::Accelerator(ui::VKEY_I, -- ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); -+ ui::EF_SHIFT_DOWN | ui::EF_PLATFORM_ACCELERATOR); - return true; - case IDC_CONTENT_CONTEXT_PASTE: - *accel = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); + *accel = ui::Accelerator(ui::VKEY_V, ui::EF_PLATFORM_ACCELERATOR); @@ -50,7 +44,7 @@ return true; case IDC_CONTENT_CONTEXT_ROTATECCW: -@@ -192,11 +192,11 @@ bool RenderViewContextMenuViews::GetAcce +@@ -187,11 +187,11 @@ bool RenderViewContextMenuViews::GetAcce return true; case IDC_PRINT: @@ -75,20 +69,9 @@ } else if (platform_key == values::kKeybindingPlatformDefault) { // If we see "Command+foo" in the Default section it can mean two // things, depending on the platform: ---- a/content/renderer/pepper/pepper_plugin_instance_impl.cc -+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc -@@ -1437,7 +1437,7 @@ void PepperPluginInstanceImpl::SelectAll - - // TODO(https://crbug.com/836074) |kPlatformModifier| should be - // |ui::EF_PLATFORM_ACCELERATOR| (|ui::EF_COMMAND_DOWN| on Mac). -- static const ui::EventFlags kPlatformModifier = ui::EF_CONTROL_DOWN; -+ static const ui::EventFlags kPlatformModifier = ui::EF_COMMAND_DOWN; - // Synthesize a ctrl + a key event to send to the plugin and let it sort out - // the event. See also https://crbug.com/739529. - ui::KeyEvent char_event(L'A', ui::VKEY_A, ui::DomCode::NONE, --- a/third_party/blink/renderer/core/editing/editing_behavior.cc +++ b/third_party/blink/renderer/core/editing/editing_behavior.cc -@@ -45,7 +45,7 @@ const unsigned kCtrlKey = WebInputEvent: +@@ -44,7 +44,7 @@ const unsigned kCtrlKey = WebInputEvent: const unsigned kAltKey = WebInputEvent::kAltKey; const unsigned kShiftKey = WebInputEvent::kShiftKey; const unsigned kMetaKey = WebInputEvent::kMetaKey; @@ -97,7 +80,7 @@ // Aliases for the generic key defintions to make kbd shortcuts definitions more // readable on OS X. const unsigned kOptionKey = kAltKey; -@@ -88,7 +88,7 @@ struct DomKeyKeyDownEntry { +@@ -87,7 +87,7 @@ struct DomKeyKeyDownEntry { const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEntries[] = { {VKEY_LEFT, 0, "MoveLeft"}, {VKEY_LEFT, kShiftKey, "MoveLeftAndModifySelection"}, @@ -106,7 +89,7 @@ {VKEY_LEFT, kOptionKey, "MoveWordLeft"}, {VKEY_LEFT, kOptionKey | kShiftKey, "MoveWordLeftAndModifySelection"}, #else -@@ -97,7 +97,7 @@ const KeyboardCodeKeyDownEntry kKeyboard +@@ -96,7 +96,7 @@ const KeyboardCodeKeyDownEntry kKeyboard #endif {VKEY_RIGHT, 0, "MoveRight"}, {VKEY_RIGHT, kShiftKey, "MoveRightAndModifySelection"}, @@ -115,7 +98,7 @@ {VKEY_RIGHT, kOptionKey, "MoveWordRight"}, {VKEY_RIGHT, kOptionKey | kShiftKey, "MoveWordRightAndModifySelection"}, #else -@@ -110,7 +110,7 @@ const KeyboardCodeKeyDownEntry kKeyboard +@@ -109,7 +109,7 @@ const KeyboardCodeKeyDownEntry kKeyboard {VKEY_DOWN, 0, "MoveDown"}, {VKEY_DOWN, kShiftKey, "MoveDownAndModifySelection"}, {VKEY_NEXT, kShiftKey, "MovePageDownAndModifySelection"}, @@ -124,7 +107,7 @@ {VKEY_UP, kCtrlKey, "MoveParagraphBackward"}, {VKEY_UP, kCtrlKey | kShiftKey, "MoveParagraphBackwardAndModifySelection"}, {VKEY_DOWN, kCtrlKey, "MoveParagraphForward"}, -@@ -120,18 +120,18 @@ const KeyboardCodeKeyDownEntry kKeyboard +@@ -119,18 +119,18 @@ const KeyboardCodeKeyDownEntry kKeyboard #endif {VKEY_HOME, 0, "MoveToBeginningOfLine"}, {VKEY_HOME, kShiftKey, "MoveToBeginningOfLineAndModifySelection"}, @@ -146,7 +129,7 @@ {VKEY_END, kCtrlKey, "MoveToEndOfDocument"}, {VKEY_END, kCtrlKey | kShiftKey, "MoveToEndOfDocumentAndModifySelection"}, #endif -@@ -145,7 +145,7 @@ const KeyboardCodeKeyDownEntry kKeyboard +@@ -144,7 +144,7 @@ const KeyboardCodeKeyDownEntry kKeyboard {VKEY_BACK, kCtrlKey, "DeleteWordBackward"}, {VKEY_DELETE, kCtrlKey, "DeleteWordForward"}, #endif @@ -155,7 +138,7 @@ {'B', kCommandKey, "ToggleBold"}, {'I', kCommandKey, "ToggleItalic"}, #else -@@ -168,14 +168,14 @@ const KeyboardCodeKeyDownEntry kKeyboard +@@ -167,14 +167,14 @@ const KeyboardCodeKeyDownEntry kKeyboard #if !defined(OS_MAC) // On OS X, we pipe these back to the browser, so that it can do menu item // blinking. @@ -178,7 +161,7 @@ #endif #if defined(OS_WIN) {VKEY_BACK, kAltKey, "Undo"}, -@@ -274,19 +274,19 @@ bool EditingBehavior::ShouldInsertCharac +@@ -276,19 +276,19 @@ bool EditingBehavior::ShouldInsertCharac // unexpected behaviour if (ch < ' ') return false; @@ -240,7 +223,7 @@ --- a/ui/views/controls/textfield/textfield.cc +++ b/ui/views/controls/textfield/textfield.cc -@@ -253,9 +253,9 @@ Textfield::Textfield() +@@ -249,9 +249,9 @@ Textfield::Textfield() // These allow BrowserView to pass edit commands from the Chrome menu to us // when we're focused by simply asking the FocusManager to // ProcessAccelerator() with the relevant accelerators. @@ -253,7 +236,7 @@ #endif // Sometimes there are additional ignored views, such as the View representing -@@ -2160,46 +2160,47 @@ ui::TextEditCommand Textfield::GetComman +@@ -2145,46 +2145,47 @@ ui::TextEditCommand Textfield::GetComman #endif const bool control = event.IsControlDown() || event.IsCommandDown(); const bool alt = event.IsAltDown() || event.IsAltGrDown(); @@ -311,7 +294,7 @@ : ui::TextEditCommand::MOVE_LEFT_AND_MODIFY_SELECTION; case ui::VKEY_HOME: if (shift) { -@@ -2270,12 +2271,12 @@ ui::TextEditCommand Textfield::GetComman +@@ -2255,12 +2256,12 @@ ui::TextEditCommand Textfield::GetComman if (shift && control) return ui::TextEditCommand::DELETE_TO_END_OF_LINE; #endif diff --git a/tweaks/visual/hide-source-indicator-for-extensions.patch b/tweaks/visual/hide-source-indicator-for-extensions.patch index 9151d07..1d5c4eb 100644 --- a/tweaks/visual/hide-source-indicator-for-extensions.patch +++ b/tweaks/visual/hide-source-indicator-for-extensions.patch @@ -7,7 +7,7 @@ # subtle-source-indicator-for-extensions.patch - as no indicator is shown. ## ---- a/chrome/browser/resources/extensions/item.html.orig +--- a/chrome/browser/resources/extensions/item.html +++ b/chrome/browser/resources/extensions/item.html @@ -136,6 +136,7 @@ margin-inline-start: 24px; diff --git a/tweaks/visual/remove-focusring-from-locationbar.patch b/tweaks/visual/remove-focusring-from-locationbar.patch index 9f5451a..20f4b88 100644 --- a/tweaks/visual/remove-focusring-from-locationbar.patch +++ b/tweaks/visual/remove-focusring-from-locationbar.patch @@ -4,13 +4,12 @@ --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc -@@ -152,26 +152,6 @@ LocationBarView::LocationBarView(Browser - profile_(profile), +@@ -167,20 +167,6 @@ LocationBarView::LocationBarView(Browser delegate_(delegate), is_popup_mode_(is_popup_mode) { -- if (!is_popup_mode_) { -- focus_ring_ = views::FocusRing::Install(this); -- focus_ring_->SetHasFocusPredicate([](View* view) -> bool { + if (!is_popup_mode_) { +- views::FocusRing::Install(this); +- views::FocusRing::Get(this)->SetHasFocusPredicate([](View* view) -> bool { - DCHECK(views::IsViewClass(view)); - auto* v = static_cast(view); - @@ -20,14 +19,9 @@ - !v->GetOmniboxPopupView()->IsOpen(); - }); - -- focus_ring_->SetPathGenerator( +- views::FocusRing::Get(this)->SetPathGenerator( - std::make_unique()); - --#if defined(OS_MAC) -- geolocation_permission_observation_.Observe( -- g_browser_process->platform_part()->location_permission_manager()); --#endif -- } - } - - LocationBarView::~LocationBarView() = default; + #if defined(OS_MAC) + geolocation_permission_observation_.Observe( + g_browser_process->platform_part()->geolocation_manager()); diff --git a/tweaks/visual/remove-tab-search-button.patch b/tweaks/visual/remove-tab-search-button.patch deleted file mode 100644 index bea5085..0000000 --- a/tweaks/visual/remove-tab-search-button.patch +++ /dev/null @@ -1,24 +0,0 @@ -## This patch removes the tab search button from the tab strip. - ---- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc -+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc -@@ -258,19 +258,6 @@ TabStripRegionView::TabStripRegionView(s - tip_marquee_view_->SetProperty(views::kCrossAxisAlignmentKey, - views::LayoutAlignment::kCenter); - tip_marquee_view_->SetProperty(views::kMarginsKey, control_padding); -- -- const Browser* browser = tab_strip_->controller()->GetBrowser(); -- if (browser && browser->is_type_normal()) { -- auto tab_search_button = std::make_unique(tab_strip_); -- tab_search_button->SetTooltipText( -- l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH)); -- tab_search_button->SetAccessibleName( -- l10n_util::GetStringUTF16(IDS_ACCNAME_TAB_SEARCH)); -- tab_search_button->SetProperty(views::kCrossAxisAlignmentKey, -- views::LayoutAlignment::kCenter); -- tab_search_button_ = AddChildView(std::move(tab_search_button)); -- tab_search_button_->SetProperty(views::kMarginsKey, control_padding); -- } - } - - TabStripRegionView::~TabStripRegionView() = default; diff --git a/tweaks/visual/subtle-source-indicator-for-extensions.patch b/tweaks/visual/subtle-source-indicator-for-extensions.patch index 130a8c3..a55c0eb 100644 --- a/tweaks/visual/subtle-source-indicator-for-extensions.patch +++ b/tweaks/visual/subtle-source-indicator-for-extensions.patch @@ -6,9 +6,9 @@ # is __not__ applied - otherwise no indicator is shown. ## ---- a/chrome/browser/resources/extensions/item.html.orig +--- a/chrome/browser/resources/extensions/item.html +++ b/chrome/browser/resources/extensions/item.html -@@ -133,27 +133,27 @@ +@@ -133,28 +133,28 @@ } #source-indicator { @@ -17,6 +17,7 @@ position: absolute; + right: -2px; + bottom: -2px; + display: none; } .source-icon-wrapper { diff --git a/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch b/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch index 07e910d..78356af 100644 --- a/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch +++ b/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch @@ -62,7 +62,7 @@ case TOOLBAR_ELEMENT_PADDING: return touch_ui ? 0 : 4; case TOOLBAR_STANDARD_SPACING: -@@ -107,7 +107,7 @@ gfx::Insets GetLayoutInsets(LayoutInset +@@ -109,7 +109,7 @@ gfx::Insets GetLayoutInsets(LayoutInset } case TOOLBAR_INTERIOR_MARGIN: @@ -73,7 +73,7 @@ return gfx::Insets(); --- a/chrome/browser/ui/views/download/download_item_view.cc +++ b/chrome/browser/ui/views/download/download_item_view.cc -@@ -132,7 +132,7 @@ constexpr int kProgressIndicatorSize = 2 +@@ -130,7 +130,7 @@ constexpr int kProgressIndicatorSize = 2 // The vertical distance between the item's visual upper bound (as delineated // by the separator on the right) and the edge of the shelf. @@ -82,7 +82,7 @@ // The minimum vertical padding above and below contents of the download item. // This is only used when the text size is large. -@@ -540,7 +540,7 @@ gfx::Size DownloadItemView::CalculatePre +@@ -593,7 +593,7 @@ gfx::Size DownloadItemView::CalculatePre } // The normal height of the item which may be exceeded if text is large. From 2dd19d9be9c68fb5ba60f9983ab9a9fcacfcf2b5 Mon Sep 17 00:00:00 2001 From: Blaise Date: Tue, 28 Sep 2021 11:23:17 -0500 Subject: [PATCH 05/11] Add patch to hide toolbar/infobar separator --- .../visual/hide-toolbar-infobar-separator.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tweaks/visual/hide-toolbar-infobar-separator.patch diff --git a/tweaks/visual/hide-toolbar-infobar-separator.patch b/tweaks/visual/hide-toolbar-infobar-separator.patch new file mode 100644 index 0000000..fdd3ae7 --- /dev/null +++ b/tweaks/visual/hide-toolbar-infobar-separator.patch @@ -0,0 +1,15 @@ +## This patch hides the separator at the bottom of the toolbar when no infobars are present. + +--- a/chrome/browser/ui/views/frame/browser_view_layout.cc ++++ b/chrome/browser/ui/views/frame/browser_view_layout.cc +@@ -461,8 +461,9 @@ int BrowserViewLayout::LayoutBookmarkAnd + + if (delegate_->IsContentsSeparatorEnabled() && + (toolbar_->GetVisible() || bookmark_bar_) && top > 0) { +- SetViewVisibility(contents_separator_, true); ++ SetViewVisibility(contents_separator_, infobar_container_->children().size() > 1); + const int separator_height = ++ infobar_container_->children().size() < 2 ? 0 : + contents_separator_->GetPreferredSize().height(); + contents_separator_->SetBounds(vertical_layout_rect_.x(), top, + vertical_layout_rect_.width(), From 447b177f98815af8fd0210944e61d10bb794ddc6 Mon Sep 17 00:00:00 2001 From: Blaise Date: Wed, 3 Nov 2021 11:27:00 -0500 Subject: [PATCH 06/11] Updates for Chromium 96 --- tweaks/shortcuts/macos-hotkeys-on-linux.patch | 8 ++++---- tweaks/visual/hide-toolbar-infobar-separator.patch | 2 +- tweaks/visual/remove-focusring-from-locationbar.patch | 4 ++-- .../thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tweaks/shortcuts/macos-hotkeys-on-linux.patch b/tweaks/shortcuts/macos-hotkeys-on-linux.patch index 6c61028..7f2142e 100644 --- a/tweaks/shortcuts/macos-hotkeys-on-linux.patch +++ b/tweaks/shortcuts/macos-hotkeys-on-linux.patch @@ -161,7 +161,7 @@ #endif #if defined(OS_WIN) {VKEY_BACK, kAltKey, "Undo"}, -@@ -276,19 +276,19 @@ bool EditingBehavior::ShouldInsertCharac +@@ -280,19 +280,19 @@ bool EditingBehavior::ShouldInsertCharac // unexpected behaviour if (ch < ' ') return false; @@ -223,7 +223,7 @@ --- a/ui/views/controls/textfield/textfield.cc +++ b/ui/views/controls/textfield/textfield.cc -@@ -249,9 +249,9 @@ Textfield::Textfield() +@@ -240,9 +240,9 @@ Textfield::Textfield() // These allow BrowserView to pass edit commands from the Chrome menu to us // when we're focused by simply asking the FocusManager to // ProcessAccelerator() with the relevant accelerators. @@ -236,7 +236,7 @@ #endif // Sometimes there are additional ignored views, such as the View representing -@@ -2145,46 +2145,47 @@ ui::TextEditCommand Textfield::GetComman +@@ -2123,46 +2123,47 @@ ui::TextEditCommand Textfield::GetComman #endif const bool control = event.IsControlDown() || event.IsCommandDown(); const bool alt = event.IsAltDown() || event.IsAltGrDown(); @@ -294,7 +294,7 @@ : ui::TextEditCommand::MOVE_LEFT_AND_MODIFY_SELECTION; case ui::VKEY_HOME: if (shift) { -@@ -2255,12 +2256,12 @@ ui::TextEditCommand Textfield::GetComman +@@ -2233,12 +2234,12 @@ ui::TextEditCommand Textfield::GetComman if (shift && control) return ui::TextEditCommand::DELETE_TO_END_OF_LINE; #endif diff --git a/tweaks/visual/hide-toolbar-infobar-separator.patch b/tweaks/visual/hide-toolbar-infobar-separator.patch index fdd3ae7..1fc8245 100644 --- a/tweaks/visual/hide-toolbar-infobar-separator.patch +++ b/tweaks/visual/hide-toolbar-infobar-separator.patch @@ -2,7 +2,7 @@ --- a/chrome/browser/ui/views/frame/browser_view_layout.cc +++ b/chrome/browser/ui/views/frame/browser_view_layout.cc -@@ -461,8 +461,9 @@ int BrowserViewLayout::LayoutBookmarkAnd +@@ -466,8 +466,9 @@ int BrowserViewLayout::LayoutBookmarkAnd if (delegate_->IsContentsSeparatorEnabled() && (toolbar_->GetVisible() || bookmark_bar_) && top > 0) { diff --git a/tweaks/visual/remove-focusring-from-locationbar.patch b/tweaks/visual/remove-focusring-from-locationbar.patch index 20f4b88..e828a3e 100644 --- a/tweaks/visual/remove-focusring-from-locationbar.patch +++ b/tweaks/visual/remove-focusring-from-locationbar.patch @@ -4,9 +4,9 @@ --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc -@@ -167,20 +167,6 @@ LocationBarView::LocationBarView(Browser - delegate_(delegate), +@@ -169,20 +169,6 @@ LocationBarView::LocationBarView(Browser is_popup_mode_(is_popup_mode) { + set_suppress_default_focus_handling(); if (!is_popup_mode_) { - views::FocusRing::Install(this); - views::FocusRing::Get(this)->SetHasFocusPredicate([](View* view) -> bool { diff --git a/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch b/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch index 78356af..e061ab7 100644 --- a/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch +++ b/tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch @@ -73,7 +73,7 @@ return gfx::Insets(); --- a/chrome/browser/ui/views/download/download_item_view.cc +++ b/chrome/browser/ui/views/download/download_item_view.cc -@@ -130,7 +130,7 @@ constexpr int kProgressIndicatorSize = 2 +@@ -129,7 +129,7 @@ constexpr int kProgressIndicatorSize = 2 // The vertical distance between the item's visual upper bound (as delineated // by the separator on the right) and the edge of the shelf. From e03f999aaa00f1195cefc1ad0e6909d42154a822 Mon Sep 17 00:00:00 2001 From: Blaise Date: Sun, 28 Nov 2021 12:01:07 -0600 Subject: [PATCH 07/11] Add patch for neutral grey menu colors --- tweaks/visual/neutral-grey-menus.patch | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tweaks/visual/neutral-grey-menus.patch diff --git a/tweaks/visual/neutral-grey-menus.patch b/tweaks/visual/neutral-grey-menus.patch new file mode 100644 index 0000000..37875db --- /dev/null +++ b/tweaks/visual/neutral-grey-menus.patch @@ -0,0 +1,31 @@ +## Changes the GoogleGrey colors to a neutral grey + +--- a/ui/gfx/color_palette.h ++++ b/ui/gfx/color_palette.h +@@ -69,16 +69,16 @@ constexpr SkColor kGoogleYellow700 = SkC + constexpr SkColor kGoogleYellow800 = SkColorSetRGB(0xEA, 0x86, 0x00); + constexpr SkColor kGoogleYellow900 = SkColorSetRGB(0xE3, 0x74, 0x00); + +-constexpr SkColor kGoogleGrey050 = SkColorSetRGB(0xF8, 0xF9, 0xFA); +-constexpr SkColor kGoogleGrey100 = SkColorSetRGB(0xF1, 0xF3, 0xF4); +-constexpr SkColor kGoogleGrey200 = SkColorSetRGB(0xE8, 0xEA, 0xED); +-constexpr SkColor kGoogleGrey300 = SkColorSetRGB(0xDA, 0xDC, 0xE0); +-constexpr SkColor kGoogleGrey400 = SkColorSetRGB(0xBD, 0xC1, 0xC6); +-constexpr SkColor kGoogleGrey500 = SkColorSetRGB(0x9A, 0xA0, 0xA6); +-constexpr SkColor kGoogleGrey600 = SkColorSetRGB(0x80, 0x86, 0x8B); +-constexpr SkColor kGoogleGrey700 = SkColorSetRGB(0x5F, 0x63, 0x68); +-constexpr SkColor kGoogleGrey800 = SkColorSetRGB(0x3C, 0x40, 0x43); +-constexpr SkColor kGoogleGrey900 = SkColorSetRGB(0x20, 0x21, 0x24); ++constexpr SkColor kGoogleGrey050 = SkColorSetRGB(0xF9, 0xF9, 0xF9); ++constexpr SkColor kGoogleGrey100 = SkColorSetRGB(0xF3, 0xF3, 0xF3); ++constexpr SkColor kGoogleGrey200 = SkColorSetRGB(0xEA, 0xEA, 0xEA); ++constexpr SkColor kGoogleGrey300 = SkColorSetRGB(0xDC, 0xDC, 0xDC); ++constexpr SkColor kGoogleGrey400 = SkColorSetRGB(0xC0, 0xC0, 0xC0); ++constexpr SkColor kGoogleGrey500 = SkColorSetRGB(0xAF, 0xAF, 0xAF); ++constexpr SkColor kGoogleGrey600 = SkColorSetRGB(0x85, 0x85, 0x85); ++constexpr SkColor kGoogleGrey700 = SkColorSetRGB(0x98, 0x98, 0x98); ++constexpr SkColor kGoogleGrey800 = SkColorSetRGB(0x3F, 0x3F, 0x3F); ++constexpr SkColor kGoogleGrey900 = SkColorSetRGB(0x21, 0x21, 0x21); + + constexpr SkColor kGoogleOrange050 = SkColorSetRGB(0xFE, 0xEF, 0xE3); + constexpr SkColor kGoogleOrange100 = SkColorSetRGB(0xFE, 0xDF, 0xC8); From 31c0032557352505f74c92bc556a785732fb9677 Mon Sep 17 00:00:00 2001 From: Blaise Date: Sun, 28 Nov 2021 12:06:02 -0600 Subject: [PATCH 08/11] Add patch to use the default search icon in locationbar --- tweaks/visual/default-search-icon.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tweaks/visual/default-search-icon.patch diff --git a/tweaks/visual/default-search-icon.patch b/tweaks/visual/default-search-icon.patch new file mode 100644 index 0000000..a3b9d8b --- /dev/null +++ b/tweaks/visual/default-search-icon.patch @@ -0,0 +1,13 @@ +## Use the default search icon in the locationbar instead of the search engine's icon + +--- a/components/omnibox/browser/omnibox_view.cc ++++ b/components/omnibox/browser/omnibox_view.cc +@@ -205,8 +205,6 @@ ui::ImageModel OmniboxView::GetIcon(int + AutocompleteMatch match = model_->CurrentMatch(nullptr); + if (AutocompleteMatch::IsSearchType(match.type)) { + // For search queries, display default search engine's favicon. +- favicon = model_->client()->GetFaviconForDefaultSearchProvider( +- std::move(on_icon_fetched)); + + } else { + // For site suggestions, display site's favicon. From 6c03539300d5e7a3346db83957ad9333a4d6b914 Mon Sep 17 00:00:00 2001 From: Blaise Date: Sun, 28 Nov 2021 12:32:29 -0600 Subject: [PATCH 09/11] Add patch to prevent autoplay --- functionality/prevent-autoplay.patch | 159 +++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 functionality/prevent-autoplay.patch diff --git a/functionality/prevent-autoplay.patch b/functionality/prevent-autoplay.patch new file mode 100644 index 0000000..66f6ab6 --- /dev/null +++ b/functionality/prevent-autoplay.patch @@ -0,0 +1,159 @@ +## Adds a flag to prevent autoplaying media + +--- a/chrome/browser/ungoogled_flag_entries.h ++++ b/chrome/browser/ungoogled_flag_entries.h +@@ -7,1 +7,5 @@ ++ {"prevent-autoplay", ++ "PreventAutoplay", ++ "Prevents media from playing automatically. ungoogled-chromium flag.", ++ kOsAll, FEATURE_VALUE_TYPE(media::kPreventAutoplay)}, + #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ +--- a/media/base/media_switches.cc ++++ b/media/base/media_switches.cc +@@ -908,6 +908,8 @@ const base::Feature kBresenhamCadence{"B + const base::Feature kPlaybackSpeedButton{"PlaybackSpeedButton", + base::FEATURE_ENABLED_BY_DEFAULT}; + ++const base::Feature kPreventAutoplay{"PreventAutoplay", base::FEATURE_DISABLED_BY_DEFAULT}; ++ + bool IsVideoCaptureAcceleratedJpegDecodingEnabled() { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableAcceleratedMjpegDecode)) { +--- a/media/base/media_switches.h ++++ b/media/base/media_switches.h +@@ -255,6 +255,8 @@ MEDIA_EXPORT extern const base::Feature + MEDIA_EXPORT extern const base::Feature kDeprecateLowUsageCodecs; + #endif + ++MEDIA_EXPORT extern const base::Feature kPreventAutoplay; ++ + // Based on a |command_line| and the current platform, returns the effective + // autoplay policy. In other words, it will take into account the default policy + // if none is specified via the command line and options passed for testing. +--- a/third_party/blink/renderer/core/dom/document.cc ++++ b/third_party/blink/renderer/core/dom/document.cc +@@ -4081,6 +4081,7 @@ void Document::SetURL(const KURL& url) { + if (GetFrame()) { + if (FrameScheduler* frame_scheduler = GetFrame()->GetFrameScheduler()) + frame_scheduler->TraceUrlChange(url_.GetString()); ++ GetFrame()->ClearRealUserActivation(); + } + } + +--- a/third_party/blink/renderer/core/frame/local_frame.h ++++ b/third_party/blink/renderer/core/frame/local_frame.h +@@ -722,7 +722,17 @@ class CORE_EXPORT LocalFrame final : pub + void RebindTextInputHostForTesting(); + #endif + ++ void RealUserActivation() { rua_time_ = base::TimeTicks::Now(); } ++ void ClearRealUserActivation() { rua_time_ = base::TimeTicks(); rua_allowed_ = false; } ++ bool HasRealUserActivation() { ++ if (!rua_allowed_) rua_allowed_ = (base::TimeTicks::Now() - rua_time_).InSeconds() < 1; ++ return rua_allowed_; ++ } ++ + private: ++ bool rua_allowed_ = false; ++ base::TimeTicks rua_time_ = base::TimeTicks(); ++ + friend class FrameNavigationDisabler; + // LocalFrameMojoHandler is a part of LocalFrame. + friend class LocalFrameMojoHandler; +--- a/third_party/blink/renderer/core/html/media/html_media_element.cc ++++ b/third_party/blink/renderer/core/html/media/html_media_element.cc +@@ -2530,6 +2530,7 @@ bool HTMLMediaElement::ended() const { + } + + bool HTMLMediaElement::Autoplay() const { ++ if (base::FeatureList::IsEnabled(media::kPreventAutoplay)) return false; + return FastHasAttribute(html_names::kAutoplayAttr); + } + +@@ -2638,6 +2639,17 @@ ScriptPromise HTMLMediaElement::playForB + absl::optional HTMLMediaElement::Play() { + DVLOG(2) << "play(" << *this << ")"; + ++ if (base::FeatureList::IsEnabled(media::kPreventAutoplay)) { ++ if (!GetDocument().GetFrame()->HasRealUserActivation()) { ++ if (rua_mute_state_ == -1) rua_mute_state_ = muted_; ++ return DOMExceptionCode::kNotAllowedError; ++ } ++ if (rua_mute_state_ > -1) { ++ if (muted_ != rua_mute_state_) setMuted(rua_mute_state_); ++ rua_mute_state_ = -1; ++ } ++ } ++ + absl::optional exception_code = + autoplay_policy_->RequestPlay(); + +--- a/third_party/blink/renderer/core/html/media/html_media_element.h ++++ b/third_party/blink/renderer/core/html/media/html_media_element.h +@@ -763,6 +763,8 @@ class CORE_EXPORT HTMLMediaElement + // playback raters other than 1.0. + bool preserves_pitch_ = true; + ++ signed char rua_mute_state_ = -1; ++ + // Keeps track of when the player seek event was sent to the browser process. + base::TimeTicks last_seek_update_time_; + +--- a/third_party/blink/renderer/core/input/event_handler.cc ++++ b/third_party/blink/renderer/core/input/event_handler.cc +@@ -830,6 +830,7 @@ WebInputEventResult EventHandler::Handle + return WebInputEventResult::kHandledSuppressed; + } + ++ frame_->RealUserActivation(); + LocalFrame::NotifyUserActivation( + frame_, mojom::blink::UserActivationNotificationType::kInteraction, + RuntimeEnabledFeatures::BrowserVerifiedUserActivationMouseEnabled()); +--- a/third_party/blink/renderer/core/input/gesture_manager.cc ++++ b/third_party/blink/renderer/core/input/gesture_manager.cc +@@ -240,6 +240,7 @@ WebInputEventResult GestureManager::Hand + FlooredIntPoint(gesture_event.PositionInRootFrame()); + Node* tapped_node = current_hit_test.InnerNode(); + Element* tapped_element = current_hit_test.InnerElement(); ++ if(tapped_node) tapped_node->GetDocument().GetFrame()->RealUserActivation(); + LocalFrame::NotifyUserActivation( + tapped_node ? tapped_node->GetDocument().GetFrame() : nullptr, + mojom::blink::UserActivationNotificationType::kInteraction); +@@ -403,6 +404,7 @@ WebInputEventResult GestureManager::Hand + return WebInputEventResult::kNotHandled; + } + ++ if(inner_node) inner_node->GetDocument().GetFrame()->RealUserActivation(); + LocalFrame::NotifyUserActivation( + inner_node ? inner_node->GetDocument().GetFrame() : nullptr, + mojom::blink::UserActivationNotificationType::kInteraction); +--- a/third_party/blink/renderer/core/input/keyboard_event_manager.cc ++++ b/third_party/blink/renderer/core/input/keyboard_event_manager.cc +@@ -210,6 +210,7 @@ WebInputEventResult KeyboardEventManager + if (!is_modifier && initial_key_event.dom_key != ui::DomKey::ESCAPE && + (initial_key_event.GetType() == WebInputEvent::Type::kKeyDown || + initial_key_event.GetType() == WebInputEvent::Type::kRawKeyDown)) { ++ frame_->RealUserActivation(); + LocalFrame::NotifyUserActivation( + frame_, mojom::blink::UserActivationNotificationType::kInteraction, + RuntimeEnabledFeatures::BrowserVerifiedUserActivationKeyboardEnabled()); +--- a/third_party/blink/renderer/core/input/pointer_event_manager.cc ++++ b/third_party/blink/renderer/core/input/pointer_event_manager.cc +@@ -650,6 +650,7 @@ WebInputEventResult PointerEventManager: + // associated with so just pick the pointer event that comes. + if (event.GetType() == WebInputEvent::Type::kPointerUp && + !non_hovering_pointers_canceled_ && pointer_event_target.target_frame) { ++ pointer_event_target.target_frame->RealUserActivation(); + LocalFrame::NotifyUserActivation( + pointer_event_target.target_frame, + mojom::blink::UserActivationNotificationType::kInteraction); +--- a/third_party/blink/renderer/modules/mediasession/media_session.cc ++++ b/third_party/blink/renderer/modules/mediasession/media_session.cc +@@ -410,6 +410,7 @@ void MediaSession::DidReceiveAction( + LocalDOMWindow* window = GetSupplementable()->DomWindow(); + if (!window) + return; ++ window->GetFrame()->RealUserActivation(); + LocalFrame::NotifyUserActivation( + window->GetFrame(), + mojom::blink::UserActivationNotificationType::kInteraction); From 2710c0f60bd7be948dacad7589cf10931f7f0cc2 Mon Sep 17 00:00:00 2001 From: Blaise Date: Sun, 28 Nov 2021 12:36:27 -0600 Subject: [PATCH 10/11] Add patch for clear all downloads button --- functionality/clear-downloads-button.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 functionality/clear-downloads-button.patch diff --git a/functionality/clear-downloads-button.patch b/functionality/clear-downloads-button.patch new file mode 100644 index 0000000..46d9925 --- /dev/null +++ b/functionality/clear-downloads-button.patch @@ -0,0 +1,37 @@ +## Replaces the Show all downloads button in the download bar with a button that clears all downloads + +--- a/chrome/browser/download/download_shelf.cc ++++ b/chrome/browser/download/download_shelf.cc +@@ -151,3 +151,8 @@ void DownloadShelf::OnGetDownloadDoneFor + ShowDownload(OfflineItemModel::Wrap(manager, item.value())); + } + } ++ ++void DownloadShelf::Clear() { ++ auto* const manager = profile()->GetDownloadManager(); ++ if (manager) manager->RemoveDownloadsByURLAndTime(base::BindRepeating([](const GURL&) { return true; }), base::Time(), base::Time()); ++} +--- a/chrome/browser/download/download_shelf.h ++++ b/chrome/browser/download/download_shelf.h +@@ -69,6 +69,8 @@ class DownloadShelf { + virtual views::View* GetView() = 0; + bool is_hidden() const { return is_hidden_; } + ++ void Clear(); ++ + protected: + virtual void DoShowDownload(DownloadUIModel::DownloadUIModelPtr download) = 0; + virtual void DoOpen() = 0; +--- a/chrome/browser/ui/views/download/download_shelf_view.cc ++++ b/chrome/browser/ui/views/download/download_shelf_view.cc +@@ -78,8 +78,8 @@ DownloadShelfView::DownloadShelfView(Bro + SetVisible(false); + + show_all_view_ = AddChildView(std::make_unique( +- base::BindRepeating(&chrome::ShowDownloads, browser), +- l10n_util::GetStringUTF16(IDS_SHOW_ALL_DOWNLOADS))); ++ base::BindRepeating(&DownloadShelf::Clear, base::Unretained(this)), ++ l10n_util::GetStringUTF16(IDS_DOWNLOAD_LINK_CLEAR_ALL))); + show_all_view_->SizeToPreferredSize(); + + close_button_ = AddChildView(views::CreateVectorImageButton( From 6ab168c95e326e435aa04dfe40d01810adbe7f1c Mon Sep 17 00:00:00 2001 From: Blaise Date: Sun, 28 Nov 2021 12:46:38 -0600 Subject: [PATCH 11/11] Add patch to add bookmarkbar into the toolbar --- functionality/bookmarkbar-in-toolbar.patch | 150 +++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 functionality/bookmarkbar-in-toolbar.patch diff --git a/functionality/bookmarkbar-in-toolbar.patch b/functionality/bookmarkbar-in-toolbar.patch new file mode 100644 index 0000000..24a0b35 --- /dev/null +++ b/functionality/bookmarkbar-in-toolbar.patch @@ -0,0 +1,150 @@ +## Adds a copy of the bookmark bar into the toolbar to the right of the locationbar +# +# 'Other Bookmarks' and the Reading List are not shown. +# You'll probably want to hide the existing bookmark bar through the right-click menu +# as well as launch with --bookmark-bar-ntp=never +# The location can be changed by moving the position in chrome/browser/ui/views/toolbar/toolbar_view.cc + +--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ++++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +@@ -604,10 +604,11 @@ END_METADATA + + // BookmarkBarView ------------------------------------------------------------ + +-BookmarkBarView::BookmarkBarView(Browser* browser, BrowserView* browser_view) ++BookmarkBarView::BookmarkBarView(Browser* browser, BrowserView* browser_view, bool isbbar) + : AnimationDelegateViews(this), + browser_(browser), +- browser_view_(browser_view) { ++ browser_view_(browser_view), ++ isbbar_(isbbar) { + SetID(VIEW_ID_BOOKMARK_BAR); + Init(); + +@@ -873,7 +874,7 @@ void BookmarkBarView::Layout() { + if (!model_) + return; + +- int x = kBookmarkBarHorizontalMargin; ++ int x = isbbar_ ? 0 : kBookmarkBarHorizontalMargin; + int width = View::width() - 2 * kBookmarkBarHorizontalMargin; + + const int button_height = GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT); +@@ -949,7 +950,7 @@ void BookmarkBarView::Layout() { + } + + if (model_->loaded() && !model_->bookmark_bar_node()->children().empty()) { +- bool last_visible = x < max_x; ++ bool last_visible = x < max_x || isbbar_; + size_t button_count = bookmark_buttons_.size(); + for (size_t i = 0; i <= button_count; ++i) { + if (i == button_count) { +@@ -971,6 +972,10 @@ void BookmarkBarView::Layout() { + gfx::Size pref = child->GetPreferredSize(); + int next_x = x + pref.width() + bookmark_bar_button_padding; + last_visible = next_x < max_x; ++ if (isbbar_) { ++ next_x -= bookmark_bar_button_padding; ++ last_visible = true; ++ } + child->SetVisible(last_visible); + // Only need to set bounds if the view is actually visible. + if (last_visible) +@@ -979,6 +984,18 @@ void BookmarkBarView::Layout() { + } + } + ++ if (isbbar_ && !bookmark_buttons_.empty()) { ++ bookmarks_separator_view_->SetBounds(x, (View::height() - bookmarks_separator_pref.height()) / 2, ++ bookmarks_separator_pref.width(), bookmarks_separator_pref.height()); ++ bookmarks_separator_view_->SetVisible(true); ++ gfx::Size prefsize(x + bookmarks_separator_pref.width(), GetLayoutConstant(BOOKMARK_BAR_HEIGHT)); ++ if (prefsize != GetPreferredSize()) { ++ SetPreferredSize(prefsize); ++ PreferredSizeChanged(); ++ } ++ return; ++ } ++ + // Layout the right side buttons. + x = max_x + bookmark_bar_button_padding; + +--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ++++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h +@@ -76,7 +76,7 @@ class BookmarkBarView : public views::Ac + + METADATA_HEADER(BookmarkBarView); + // |browser_view| can be NULL during tests. +- BookmarkBarView(Browser* browser, BrowserView* browser_view); ++ BookmarkBarView(Browser* browser, BrowserView* browser_view, bool isbbar = false); + BookmarkBarView(const BookmarkBarView&) = delete; + BookmarkBarView& operator=(const BookmarkBarView&) = delete; + ~BookmarkBarView() override; +@@ -477,6 +477,8 @@ class BookmarkBarView : public views::Ac + // Returns WeakPtrs used in GetDropCallback(). Used to ensure + // safety if `model_` is mutated after getting the callback. + base::WeakPtrFactory drop_weak_ptr_factory_{this}; ++ ++ bool isbbar_ = false; + }; + + #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ +--- a/chrome/browser/ui/views/frame/browser_view.cc ++++ b/chrome/browser/ui/views/frame/browser_view.cc +@@ -3388,6 +3388,7 @@ bool BrowserView::MaybeShowBookmarkBar(W + // Don't change the visibility of the BookmarkBarView. BrowserViewLayout + // handles it. + bookmark_bar_view_->SetPageNavigator(GetActiveWebContents()); ++ toolbar_->SetBookmarkPageNavigator(); + + // Update parenting for the bookmark bar. This may detach it from all views. + bool needs_layout = false; +--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc ++++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc +@@ -38,6 +38,7 @@ + #include "chrome/browser/ui/toolbar/chrome_labs_prefs.h" + #include "chrome/browser/ui/ui_features.h" + #include "chrome/browser/ui/view_ids.h" ++#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" + #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" + #include "chrome/browser/ui/views/extensions/extension_popup.h" + #include "chrome/browser/ui/views/extensions/extensions_side_panel_controller.h" +@@ -332,6 +333,8 @@ void ToolbarView::Init() { + + location_bar_ = AddChildView(std::move(location_bar)); + ++ bbar_ = AddChildView(std::make_unique(browser_, browser_view_, true)); ++ + if (extensions_container) + extensions_container_ = AddChildView(std::move(extensions_container)); + +@@ -502,6 +505,10 @@ bool ToolbarView::GetAppMenuFocused() co + return app_menu_button_ && app_menu_button_->HasFocus(); + } + ++void ToolbarView::SetBookmarkPageNavigator() { ++ bbar_->SetPageNavigator(GetWebContents()); ++} ++ + void ToolbarView::ShowIntentPickerBubble( + std::vector app_info, + bool show_stay_in_chrome, +--- a/chrome/browser/ui/views/toolbar/toolbar_view.h ++++ b/chrome/browser/ui/views/toolbar/toolbar_view.h +@@ -124,6 +124,8 @@ class ToolbarView : public views::Access + // Returns true if the app menu is focused. + bool GetAppMenuFocused() const; + ++ void SetBookmarkPageNavigator(); ++ + void ShowIntentPickerBubble( + std::vector app_info, + bool show_stay_in_chrome, +@@ -275,6 +277,7 @@ class ToolbarView : public views::Access + HomeButton* home_ = nullptr; + CustomTabBarView* custom_tab_bar_ = nullptr; + LocationBarView* location_bar_ = nullptr; ++ BookmarkBarView* bbar_ = nullptr; + ExtensionsToolbarContainer* extensions_container_ = nullptr; + ChromeLabsButton* chrome_labs_button_ = nullptr; + media_router::CastToolbarButton* cast_ = nullptr;