From 27337d7458dde60c0504e8788bec813ae690624b Mon Sep 17 00:00:00 2001 From: mkarolin Date: Thu, 27 Jan 2022 15:18:39 -0500 Subject: [PATCH] Removes sharing hub social platforms section. fix https://github.com/brave/brave-browser/issues/26019 --- .../sharing_hub/sharing_hub_bubble_view_impl.cc | 14 ++++++++++++++ ...aring_hub-sharing_hub_bubble_view_impl.cc.patch | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 chromium_src/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc create mode 100644 patches/chrome-browser-ui-views-sharing_hub-sharing_hub_bubble_view_impl.cc.patch diff --git a/chromium_src/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc b/chromium_src/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc new file mode 100644 index 000000000000..f4b8e2fc1b88 --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc @@ -0,0 +1,14 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#define BRAVE_SHARING_HUB_BUBBLE_VIEW_IMPL_POPULATE_SCROLL_VIEW \ + share_link_label_ = new views::Label( \ + l10n_util::GetStringUTF16(IDS_SHARING_HUB_SHARE_LABEL)); \ + MaybeSizeToContents(); \ + Layout(); \ + return; + +#include "src/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc" +#undef BRAVE_SHARING_HUB_BUBBLE_VIEW_IMPL_POPULATE_SCROLL_VIEW diff --git a/patches/chrome-browser-ui-views-sharing_hub-sharing_hub_bubble_view_impl.cc.patch b/patches/chrome-browser-ui-views-sharing_hub-sharing_hub_bubble_view_impl.cc.patch new file mode 100644 index 000000000000..1ddf6d80d571 --- /dev/null +++ b/patches/chrome-browser-ui-views-sharing_hub-sharing_hub_bubble_view_impl.cc.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc b/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc +index 515fb2ce8d47f75a09283438198691fdf78328e2..3214caa20c0b6b6833c2ed9ed63a0aef90708682 100644 +--- a/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc ++++ b/chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl.cc +@@ -163,6 +163,7 @@ void SharingHubBubbleViewImpl::PopulateScrollView( + view->SetGroup(kActionButtonGroup); + } + ++ BRAVE_SHARING_HUB_BUBBLE_VIEW_IMPL_POPULATE_SCROLL_VIEW + action_list_view->AddChildView(std::make_unique()); + + constexpr int kIndent = 12;