From c1c953d11f9f41f5c00835f3b01b1a19d5b280b3 Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Mon, 30 Dec 2024 02:55:12 -0600 Subject: [PATCH] fix view_ID, and mini_installer BUILD.gn --- other/thorium-2024-ui.patch | 17 +++++++++++---- src/BUILD.gn | 23 ++++++++++++++------ src/chrome/installer/mini_installer/BUILD.gn | 20 +++++++++++------ 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/other/thorium-2024-ui.patch b/other/thorium-2024-ui.patch index adcf2990..580299c5 100644 --- a/other/thorium-2024-ui.patch +++ b/other/thorium-2024-ui.patch @@ -1250,7 +1250,7 @@ index 6a91493f7c2bc..fdeb2a4a0916e 100644 flag_descriptions::kScrollableTabStripFlagId, l10n_util::GetStringUTF16(IDS_TAB_SCROLLING_EXPERIMENT_NAME), diff --git a/chrome/browser/ui/view_ids.h b/chrome/browser/ui/view_ids.h -index fb9afeed5a60e..d40af6311e073 100644 +index fb9afeed5a60e..7b47ee8281b99 100644 --- a/chrome/browser/ui/view_ids.h +++ b/chrome/browser/ui/view_ids.h @@ -16,6 +16,7 @@ enum ViewID { @@ -1261,6 +1261,14 @@ index fb9afeed5a60e..d40af6311e073 100644 VIEW_ID_MINIMIZE_BUTTON, VIEW_ID_MAXIMIZE_BUTTON, VIEW_ID_RESTORE_BUTTON, +@@ -51,6 +52,7 @@ enum ViewID { + VIEW_ID_FORWARD_BUTTON, + VIEW_ID_RELOAD_BUTTON, + VIEW_ID_HOME_BUTTON, ++ VIEW_ID_RESTORE_TAB_BUTTON, + VIEW_ID_STAR_BUTTON, + VIEW_ID_EXTENSIONS_MENU_BUTTON, + VIEW_ID_APP_MENU, diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 9cecb25b41d3b..a0662f288a022 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -3326,7 +3334,7 @@ index 65676013fece9..d45fc4f3e1754 100644 + // The separator should never appear at the end of the tab strip. + //if (!adjacent_tab && !leading) { -+ //return 1.0f; ++ //return 0.0f; + //} + const Tab* const left_tab = leading ? adjacent_tab : tab(); @@ -3394,10 +3402,10 @@ index b071682471a32..94123478b7fab 100644 // TODO(elainechien): Check with UI whether we want to draw overflow diff --git a/chrome/browser/ui/views/toolbar/restore_tab_button.cc b/chrome/browser/ui/views/toolbar/restore_tab_button.cc new file mode 100644 -index 0000000000000..4bd2f5fa3eb41 +index 0000000000000..97d29250ae49d --- /dev/null +++ b/chrome/browser/ui/views/toolbar/restore_tab_button.cc -@@ -0,0 +1,71 @@ +@@ -0,0 +1,72 @@ +// Copyright 2024 The Chromium Authors and Alex313031 +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -3411,6 +3419,7 @@ index 0000000000000..4bd2f5fa3eb41 +#include "chrome/browser/command_updater.h" +#include "chrome/browser/external_protocol/external_protocol_handler.h" +#include "chrome/browser/ui/browser.h" ++#include "chrome/browser/ui/view_ids.h" +#include "chrome/grit/generated_resources.h" +#include "components/vector_icons/vector_icons.h" +#include "ui/base/l10n/l10n_util.h" diff --git a/src/BUILD.gn b/src/BUILD.gn index e0008090..d78d8561 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -78,9 +78,7 @@ if (is_official_build) { # Thorium target that simply pulls in the chrome target as a dependency group("thorium") { - if (is_win || is_linux || is_mac || is_chromeos || is_fuchsia) { - deps = [ "//chrome:chrome" ] - } + deps = [ "//chrome:chrome" ] if (is_win) { deps += [ "//chrome:chrome_dll" ] @@ -95,6 +93,10 @@ group("thorium") { group("thorium_sandbox") { if (is_linux || is_chromeos) { deps = [ "//sandbox/linux:chrome_sandbox" ] + } else if (is_win) { + deps = [ "//sandbox/win:sandbox" ] + } else { + deps = [ "//sandbox:sandbox" ] } } @@ -103,9 +105,10 @@ group("thorium_sandbox") { group("thorium_all") { testonly = true + deps = [ ":thorium" ] + if (is_win || is_linux || is_mac) { - deps = [ - "//chrome:chrome", + deps += [ "//chrome/test/chromedriver:chromedriver", "//components/policy:policy_templates", "//content/shell:thorium_shell", @@ -116,8 +119,10 @@ group("thorium_all") { } } - if (is_linux) { - deps += [ ":thorium_sandbox" ] + if (is_linux || is_chromeos) { + deps += [ + "//chrome/test/chromedriver:chromedriver" + ] } if (is_win) { @@ -127,6 +132,10 @@ group("thorium_all") { ] } + if ((is_posix && is_debug) || is_mac) { + deps += [ "//third_party/breakpad:minidump_stackwalk" ] + } + if (is_android) { if (current_cpu == "arm") { deps = [ diff --git a/src/chrome/installer/mini_installer/BUILD.gn b/src/chrome/installer/mini_installer/BUILD.gn index 57cd26ff..acc80078 100644 --- a/src/chrome/installer/mini_installer/BUILD.gn +++ b/src/chrome/installer/mini_installer/BUILD.gn @@ -41,15 +41,21 @@ config("mini_installer_compiler_flags") { if (!use_sse3 && use_sse2) { cflags += [ "/arch:SSE2", ] - } else if (!use_avx && use_sse3) { + } else if (use_sse3) { cflags += [ "/clang:-msse3", ] - } else if (!use_avx && use_sse41) { + } else if (use_sse41) { cflags += [ "/clang:-mssse3", "/clang:-msse4.1", ] } else if (!use_avx && use_sse42) { - cflags += [ "/arch:SSE42", ] - } else if (use_avx) { + if (current_cpu == "x86") { + cflags += [ "/clang:-msse4.2", ] + } else { + cflags += [ "/arch:SSE42", ] + } + } else if (!use_avx2 && use_avx) { cflags += [ "/arch:AVX", ] - } else if (use_avx2 || use_avx512) { + } else if (!use_avx512 && use_avx2) { + cflags += [ "/arch:AVX2", ] + } else if (use_avx512) { cflags += [ "/arch:AVX2", ] } else { print("No SIMD") @@ -425,14 +431,14 @@ if (!(is_component_build && is_debug && target_cpu == "x86") && root_out_dir) inputs = [ "$root_out_dir/" + alternate_version_generator_rel_path, - "$root_out_dir/mini_installer.exe", + "$root_out_dir/thorium_mini_installer.exe", ] outputs = [ "$root_out_dir/$target_name.exe" ] args = [ "--alternate_version_generator", alternate_version_generator_rel_path, "--mini_installer", - "mini_installer.exe", + "thorium_mini_installer.exe", "--out", "$target_name.exe", "--path_7za",