├── LICENSE ├── README.md ├── build.sh.patch ├── bus.cc.patch ├── gn_flags.map.patch ├── native_backend_kwallet_x_unittest.cc.patch ├── patch_order.list.patch └── tab.cc.patch /LICENSE: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The ungoogled-chromium Authors. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of the copyright holder nor the names of its 14 | // contributors may be used to endorse or promote products derived from 15 | // this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UGChrome 2 | UGChrome Browser is a custom build of [ungoogled-chromium](//github.com/Eloston/ungoogled-chromium/) with additional features 3 | 4 | #### Flavors 5 | - Linux x64 Portable 6 | - Linux x64 AppImage 7 | 8 | #### Download 9 | Just check download page https://www.opendesktop.org/p/1265481/ 10 | 11 | #### Features 12 | - Double Click Close Tab 13 | - Build without sysroot binaries 14 | - Build with those additional flags (rtc_libvpx_build_vp9=false use_system_harfbuzz=false) 15 | 16 | #### Current used patchs 17 | - gn_flags.map.patch 18 | - tab.cc.patch 19 | - patch_order.list.patch 20 | 21 | #### Upstream 22 | I will upstream thoses features (with flags) when i have the time... and/or if some one ask for ;) 23 | 24 | #### Credits 25 | * [The ungoogled-chromium Project](//github.com/Eloston/ungoogled-chromium/) 26 | * [The Chromium Project](//www.chromium.org/) 27 | * [Inox patchset](//github.com/gcarq/inox-patchset) 28 | * [Debian](//tracker.debian.org/pkg/chromium-browser) 29 | * [Iridium Browser](//iridiumbrowser.de/) 30 | * The users for testing and debugging 31 | 32 | -------------------------------------------------------------------------------- /build.sh.patch: -------------------------------------------------------------------------------- 1 | --- a/packaging/linux_simple/build.sh 2 | +++ b/packaging/linux_simple/build.sh 3 | @@ -1,5 +1,6 @@ 4 | #!/bin/bash 5 | 6 | +PARAM1=$1 7 | set -eux 8 | 9 | # Simple build script for Linux 10 | @@ -34,4 +35,6 @@ export CXX=${CXX:=clang++} 11 | 12 | ./tools/gn/bootstrap/bootstrap.py -o out/Default/gn 13 | ./out/Default/gn gen out/Default --fail-on-unused-args 14 | -ninja -C out/Default chrome chrome_sandbox chromedriver 15 | +if [[ $PARAM1 != "prepareonly" ]]; then 16 | + ninja -C out/Default chrome chrome_sandbox chromedriver 17 | +fi 18 | -------------------------------------------------------------------------------- /bus.cc.patch: -------------------------------------------------------------------------------- 1 | --- a/dbus/bus.cc 2 | +++ b/dbus/bus.cc 3 | @@ -368,54 +368,7 @@ 4 | } 5 | 6 | bool Bus::Connect() { 7 | - // dbus_bus_get_private() and dbus_bus_get() are blocking calls. 8 | - AssertOnDBusThread(); 9 | - 10 | - // Check if it's already initialized. 11 | - if (connection_) 12 | - return true; 13 | - 14 | - ScopedDBusError error; 15 | - if (bus_type_ == CUSTOM_ADDRESS) { 16 | - if (connection_type_ == PRIVATE) { 17 | - connection_ = dbus_connection_open_private(address_.c_str(), error.get()); 18 | - } else { 19 | - connection_ = dbus_connection_open(address_.c_str(), error.get()); 20 | - } 21 | - } else { 22 | - const DBusBusType dbus_bus_type = static_cast(bus_type_); 23 | - if (connection_type_ == PRIVATE) { 24 | - connection_ = dbus_bus_get_private(dbus_bus_type, error.get()); 25 | - } else { 26 | - connection_ = dbus_bus_get(dbus_bus_type, error.get()); 27 | - } 28 | - } 29 | - if (!connection_) { 30 | - LOG(ERROR) << "Failed to connect to the bus: " 31 | - << (error.is_set() ? error.message() : ""); 32 | - return false; 33 | - } 34 | - 35 | - if (bus_type_ == CUSTOM_ADDRESS) { 36 | - // We should call dbus_bus_register here, otherwise unique name can not be 37 | - // acquired. According to dbus specification, it is responsible to call 38 | - // org.freedesktop.DBus.Hello method at the beging of bus connection to 39 | - // acquire unique name. In the case of dbus_bus_get, dbus_bus_register is 40 | - // called internally. 41 | - if (!dbus_bus_register(connection_, error.get())) { 42 | - LOG(ERROR) << "Failed to register the bus component: " 43 | - << (error.is_set() ? error.message() : ""); 44 | - return false; 45 | - } 46 | - } 47 | - // We shouldn't exit on the disconnected signal. 48 | - dbus_connection_set_exit_on_disconnect(connection_, false); 49 | - 50 | - // Watch Disconnected signal. 51 | - AddFilterFunction(Bus::OnConnectionDisconnectedFilter, this); 52 | - AddMatch(kDisconnectedMatchRule, error.get()); 53 | - 54 | - return true; 55 | + return false; 56 | } 57 | 58 | void Bus::ClosePrivateConnection() { 59 | -------------------------------------------------------------------------------- /gn_flags.map.patch: -------------------------------------------------------------------------------- 1 | --- a/config_bundles/linux_portable/gn_flags.map 2 | +++ b/config_bundles/linux_portable/gn_flags.map 3 | @@ -3,3 +3,8 @@ 4 | linux_use_bundled_binutils=false 5 | optimize_for_size=false 6 | use_kerberos=false 7 | +use_lld=true 8 | + 9 | +rtc_libvpx_build_vp9=false 10 | +use_system_harfbuzz=false 11 | + 12 | -------------------------------------------------------------------------------- /native_backend_kwallet_x_unittest.cc.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc 2 | +++ b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc 3 | @@ -353,13 +353,13 @@ 4 | if (desktop_env_ == base::nix::DESKTOP_ENVIRONMENT_KDE5) { 5 | mock_kwallet_proxy_ = 6 | new dbus::MockObjectProxy(mock_session_bus_.get(), 7 | - "org.kde.kwalletd5", 8 | - dbus::ObjectPath("/modules/kwalletd5")); 9 | + "org.kde.kxalletd5", 10 | + dbus::ObjectPath("/modules/kxalletd5")); 11 | } else { 12 | mock_kwallet_proxy_ = 13 | new dbus::MockObjectProxy(mock_session_bus_.get(), 14 | - "org.kde.kwalletd", 15 | - dbus::ObjectPath("/modules/kwalletd")); 16 | + "org.kde.kxalletd", 17 | + dbus::ObjectPath("/modules/kxalletd")); 18 | } 19 | EXPECT_CALL(*mock_kwallet_proxy_.get(), CallMethodAndBlock(_, _)) 20 | .WillRepeatedly( 21 | @@ -372,14 +372,14 @@ 22 | if (desktop_env_ == base::nix::DESKTOP_ENVIRONMENT_KDE5) { 23 | EXPECT_CALL( 24 | *mock_session_bus_.get(), 25 | - GetObjectProxy("org.kde.kwalletd5", 26 | - dbus::ObjectPath("/modules/kwalletd5"))) 27 | + GetObjectProxy("org.kde.kxalletd5", 28 | + dbus::ObjectPath("/modules/kxalletd5"))) 29 | .WillRepeatedly(Return(mock_kwallet_proxy_.get())); 30 | } else { 31 | EXPECT_CALL( 32 | *mock_session_bus_.get(), 33 | - GetObjectProxy("org.kde.kwalletd", 34 | - dbus::ObjectPath("/modules/kwalletd"))) 35 | + GetObjectProxy("org.kde.kxalletd", 36 | + dbus::ObjectPath("/modules/kxalletd"))) 37 | .WillRepeatedly(Return(mock_kwallet_proxy_.get())); 38 | } 39 | 40 | @@ -474,9 +474,9 @@ 41 | EXPECT_TRUE(reader.PopBool(&blind)); 42 | 43 | if (desktop_env_ == base::nix::DESKTOP_ENVIRONMENT_KDE5) 44 | - EXPECT_EQ("kwalletd5", service_name); 45 | + EXPECT_EQ("kxalletd5", service_name); 46 | else 47 | - EXPECT_EQ("kwalletd", service_name); 48 | + EXPECT_EQ("kxalletd", service_name); 49 | EXPECT_TRUE(urls.empty()); 50 | EXPECT_TRUE(envs.empty()); 51 | EXPECT_TRUE(startup_id.empty()); 52 | @@ -498,7 +498,7 @@ 53 | dbus::MethodCall* method_call, testing::Unused) { 54 | if (!kwallet_running_) 55 | return nullptr; 56 | - EXPECT_EQ("org.kde.KWallet", method_call->GetInterface()); 57 | + EXPECT_EQ("org.kde.Kxallet", method_call->GetInterface()); 58 | 59 | if (base::ContainsKey(failing_methods_, method_call->GetMember())) 60 | return nullptr; 61 | -------------------------------------------------------------------------------- /patch_order.list.patch: -------------------------------------------------------------------------------- 1 | --- a/config_bundles/linux_portable/patch_order.list 2 | +++ b/config_bundles/linux_portable/patch_order.list 3 | @@ -1,3 +1,5 @@ 4 | +opensuse/system-libdrm.patch 5 | + 6 | ubuntu/no-new-ninja-flag.patch 7 | ubuntu/relax-ninja-version-requirement.patch 8 | ungoogled-chromium/linux/manpage.patch 9 | -------------------------------------------------------------------------------- /tab.cc.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/tabs/tab.cc 2 | +++ b/chrome/browser/ui/views/tabs/tab.cc 3 | @@ -91,6 +91,9 @@ 4 | // Opacity of the active tab background painted over inactive selected tabs. 5 | constexpr float kSelectedTabOpacity = 0.75f; 6 | 7 | +//intika dblclick 8 | +int dblClick = 0; 9 | + 10 | // Helper functions ------------------------------------------------------------ 11 | 12 | // Returns the coordinate for an object of size |item_size| centered in a region 13 | @@ -215,6 +218,8 @@ 14 | : CLOSE_TAB_FROM_TOUCH; 15 | DCHECK_EQ(close_button_, sender); 16 | controller_->CloseTab(this, source); 17 | + //intika dblclick 18 | + dblClick++; 19 | if (event.type() == ui::ET_GESTURE_TAP) 20 | TouchUMA::RecordGestureAction(TouchUMA::kGestureTabCloseTap); 21 | } 22 | @@ -421,10 +426,14 @@ 23 | } 24 | } else if (!IsSelected()) { 25 | controller_->SelectTab(this); 26 | + //intika dblclick 27 | + dblClick = 0; 28 | base::RecordAction(UserMetricsAction("SwitchTab_Click")); 29 | } 30 | } else if (!IsSelected()) { 31 | controller_->SelectTab(this); 32 | + //intika dblclick 33 | + dblClick = 0; 34 | base::RecordAction(UserMetricsAction("SwitchTab_Click")); 35 | } 36 | ui::MouseEvent cloned_event(event_in_parent, parent(), 37 | @@ -447,15 +456,22 @@ 38 | // In some cases, ending the drag will schedule the tab for destruction; if 39 | // so, bail immediately, since our members are already dead and we shouldn't 40 | // do anything else except drop the tab where it is. 41 | - if (controller_->EndDrag(END_DRAG_COMPLETE)) 42 | - return; 43 | - 44 | + if (controller_->EndDrag(END_DRAG_COMPLETE)) { 45 | + //intika dblclick 46 | + dblClick = 0; 47 | + return; 48 | + } 49 | + 50 | // Close tab on middle click, but only if the button is released over the tab 51 | // (normal windows behavior is to discard presses of a UI element where the 52 | // releases happen off the element). 53 | if (event.IsMiddleMouseButton()) { 54 | + //intika dblclick 55 | + dblClick = 0; 56 | if (HitTestPoint(event.location())) { 57 | controller_->CloseTab(this, CLOSE_TAB_FROM_MOUSE); 58 | + //intika dblclick 59 | + dblClick++; 60 | } else if (closing_) { 61 | // We're animating closed and a middle mouse button was pushed on us but 62 | // we don't contain the mouse anymore. We assume the user is clicking 63 | @@ -466,13 +482,42 @@ 64 | Tab* closest_tab = controller_->GetTabAt(location_in_parent); 65 | if (closest_tab) 66 | controller_->CloseTab(closest_tab, CLOSE_TAB_FROM_MOUSE); 67 | + //intika dblclick 68 | + dblClick++; 69 | + 70 | } 71 | } else if (event.IsOnlyLeftMouseButton() && !event.IsShiftDown() && 72 | !IsSelectionModifierDown(event)) { 73 | // If the tab was already selected mouse pressed doesn't change the 74 | // selection. Reset it now to handle the case where multiple tabs were 75 | // selected. 76 | - controller_->SelectTab(this); 77 | + 78 | + //intika dblclick - Old Code ---------------------------------------- 79 | + //controller_->SelectTab(this); 80 | + 81 | + if (!IsSelected()) { 82 | + dblClick = 0; 83 | + } 84 | + 85 | + if (dblClick > 1) { 86 | + dblClick = 0; 87 | + if (HitTestPoint(event.location())) { 88 | + controller_->CloseTab(this, CLOSE_TAB_FROM_MOUSE); 89 | + dblClick++; 90 | + } else if (closing_) { 91 | + gfx::Point location_in_parent = event.location(); 92 | + ConvertPointToTarget(this, parent(), &location_in_parent); 93 | + Tab* closest_tab = controller_->GetTabAt(location_in_parent); 94 | + if (closest_tab) 95 | + controller_->CloseTab(closest_tab, CLOSE_TAB_FROM_MOUSE); 96 | + //intika dblclick 97 | + dblClick++; 98 | + } 99 | + } else { 100 | + controller_->SelectTab(this); 101 | + dblClick++; 102 | + } 103 | + //intika dblclick --------------------------------------------------- 104 | } 105 | } 106 | 107 | --------------------------------------------------------------------------------