From 63b23efb43741287dcebbfa5e3613132460299ff Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Wed, 9 Jun 2021 13:22:08 +0900 Subject: [PATCH] Use different icon for some file types fix https://github.com/brave/brave-browser/issues/12761 When brave browser is set as a default application, different icon will be used for that file type. Currently, .pdf and .svg files will have different icon. So far, we set BraveBHTML (beta) prog id for supported file types in registry. and that BraveBHTML entry has some attributes such as default icon or commands. That default icon is used for the file type when browser is set as its default application. default icon of BraveBHTML reg entry is brave browser's default icon. Because of this, all file types uses same icon. This PR introduces new BraveFile prog entry and it uses different icon. And, new BraveFile id is set for some file types when brave is its default application. --- app/brave_exe.rc | 4 ++ app/theme/brave/win/brave_file.ico | Bin 0 -> 4286 bytes app/theme/brave/win/brave_file_beta.ico | Bin 0 -> 4286 bytes app/theme/brave/win/brave_file_dev.ico | Bin 0 -> 4286 bytes app/theme/brave/win/brave_file_nightly.ico | Bin 0 -> 4286 bytes .../chrome/common/chrome_icon_resources_win.h | 15 ++-- chromium_src/chrome/installer/DEPS | 2 + .../chrome/installer/setup/sources.gni | 11 +++ .../chrome/installer/setup/uninstall.cc | 68 ++++++++++++++++++ .../chrome/installer/util/shell_util.cc | 66 +++++++++++++++++ .../chrome/installer/util/sources.gni | 16 +++++ installer/util/BUILD.gn | 12 ++++ installer/util/DEPS | 4 ++ installer/util/brave_shell_util.cc | 34 +++++++++ installer/util/brave_shell_util.h | 18 +++++ patches/chrome-installer-setup-BUILD.gn.patch | 12 ++++ patches/chrome-installer-util-BUILD.gn.patch | 12 +++- .../chrome-installer-util-shell_util.cc.patch | 30 +++++++- 18 files changed, 295 insertions(+), 9 deletions(-) create mode 100644 app/theme/brave/win/brave_file.ico create mode 100644 app/theme/brave/win/brave_file_beta.ico create mode 100644 app/theme/brave/win/brave_file_dev.ico create mode 100644 app/theme/brave/win/brave_file_nightly.ico create mode 100644 chromium_src/chrome/installer/setup/sources.gni create mode 100644 chromium_src/chrome/installer/setup/uninstall.cc create mode 100644 chromium_src/chrome/installer/util/sources.gni create mode 100644 installer/util/BUILD.gn create mode 100644 installer/util/DEPS create mode 100644 installer/util/brave_shell_util.cc create mode 100644 installer/util/brave_shell_util.h create mode 100644 patches/chrome-installer-setup-BUILD.gn.patch diff --git a/app/brave_exe.rc b/app/brave_exe.rc index cc778f67f19..f5711db3c75 100644 --- a/app/brave_exe.rc +++ b/app/brave_exe.rc @@ -60,6 +60,10 @@ IDR_X002_APP_LIST_SXS ICON "theme\\brave\\win\\app_list_sxs.ico" IDR_X003_INCOGNITO ICON "theme\\brave\\win\\incognito.ico" IDR_X004_DEV ICON "theme\\brave\\win\\brave_dev.ico" IDR_X005_BETA ICON "theme\\brave\\win\\brave_beta.ico" +IDR_X006_FILE ICON "theme\\brave\\win\\brave_file.ico" +IDR_X006_FILE_BETA ICON "theme\\brave\\win\\brave_file_beta.ico" +IDR_X006_FILE_DEVA ICON "theme\\brave\\win\\brave_file_dev.ico" +IDR_X006_FILE_SXS ICON "theme\\brave\\win\\brave_file_nightly.ico" #else IDR_X001_APP_LIST ICON "theme\\brave\\win\\app_list.ico" IDR_X003_INCOGNITO ICON "theme\\brave\\win\\incognito.ico" diff --git a/app/theme/brave/win/brave_file.ico b/app/theme/brave/win/brave_file.ico new file mode 100644 index 0000000000000000000000000000000000000000..bc7c7b924f41fbc5eae146f0c8b19002f28941e8 GIT binary patch literal 4286 zcmbVPTWB0r7@ln#Qb=MO)3^nNq)!$Ei6)X_wOvJp^uY@ft5|FVE!s*5cmcthpcJe$ zwg@&VN{hY}MUcJ}8%TnA5)xuF+k|qyrhbxw)C>3Eb&H&(&Tq z7*yA}*Q)FEn0vTyXK88acJzK)8ZOEOXu_jFp+;I-TA_;~uIV|(oELHKuB&~H0Y2kF z;9kIwhI`7(%a3$+cK$IoHg?0sKjY)$9D6;-=3MWaYkJ(;+WK2bNy$O*(-)~)0Gq*y ziHYWTJT7Z%YYK@(LTuYs5T{}4%-Q>CLqkJX@of4aRa5*cD=V_Px~iacB+;-Xt=7m3 z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BfsA-8fMWEiw)>e_XHZC1@Ar7$err_!8S1J>+7FkZv3x^SLF8} zbSn)?hw=%|2dMZ|et{0lUvh8Ix9no@JJ|_0bP2!RcC+aKj}@aa9k{E|WY^1UjH;@t zjlA!C=THI literal 0 HcmV?d00001 diff --git a/app/theme/brave/win/brave_file_nightly.ico b/app/theme/brave/win/brave_file_nightly.ico new file mode 100644 index 0000000000000000000000000000000000000000..23063abd4d81958db8c168b4b68a1650252b3b97 GIT binary patch literal 4286 zcmbVPZERCz6utu%NH$c!QDRKMAATib3?oA1hx3=EnBvP z`C*G>C50z#9UUE&!^6WgGBP4~@ZbUIx-Ott;cl#t+Dd6{Z9U0*!v@KU@ZZ0GpN58p z1WHE&4dc=(jaWD^Fwn-tvyzeXTuNG6nk^cQ5;TmZ16okb`^$hah6;UU8`R7nvck`6 zY=eV?1dP_9YyrP0dw|DOm@2V9tezkI{r&v}jMf34um&AE`T|{4^~qr>U->JAZwE~h zVrMrEh#(U`d^}bW|M&Iv2|qOOb7ouU@JVaIWxDuEE>*8TMv+KF;B-2P?@YWO3*M@vORMoe z2X-l0y_?*NcMJa&=J)S&N^Vdw;{E#yRTrG6ihKu!Jk8=i#IF&L`b6yC)6+wM zp+juZQB=kJdxZbid%uw{*FnRPLF#Yqri%52RJ?Q>?SEnw?V7!k%J&w>^Om|N6FL9g zyLW}(tRuLyRQT)H921)k279P{`Ccl0Emt&P@Z4v1;V*c5^XS~Ab1bz@pFSP=C#nCD zf4aK52pYP(y9LnUUw(*c`TX^3WBlN2{p&i_?Ky|06xXKTg+F)Rhbni;T}8eCKXY5k zf1RD31VDqp8`K+@{4D&<-<%aL-*yLix1FKe-<=ZsWAN&(6T-h`W;S_BuS@4Y; z^9EwblKokmjo+KZ?^6Nn5ZdgZz>33)Lh8=*9_qQ;B))g&{qxXV{#%=9|I!Wd+=V;B zKD1w6*<$l~j9XS;I97|UDZJ|(z0O)`nLiTdu_btz-kx2BRvySc*zOz;Ae`M7z#GLR$ z1ILkNe&lXIX$YOH7JiBU4-S)O^%1(ZbPsvIKSSQ#CFFQ>Cmnx%D;2%FUE(i?urw^GUTo9NWj8|c_mpOgK` zwRAA+D{^c(NUmRsAIe?Oz;R?b{sMsj0nowUO`;=i3txb4tT;ff`3CqrhK2@eY;25! z-$eo5f0`BkrluzH`~9LJfsS}=K##g7&;Tu7uUBg1PWAp^8-#0XYZo&&epe(b^8E+h zN`um&e1h`*Y1!ii(Ow zyzhADRyGm;`+Pp}pVE;?gNhCFJ%J{CgWrFzlflaiJ@FFrN-i)}TWN=Buiz@ZGm&0ybA? zSM{XQ($Ym7$K8l!lRZTTbBGRbv9G}|8sHD;yl~;dYTjsy+U$SUhy%pTl&q{Q?1kUN zK)j!snVAY;OwAi>t;QNZrfE@4n;X`&M*;tTG1VATwOV8Do7;)zF*cX+Dq}N)!dePr JGDWqi^epush_back(std::make_unique( \ + key_name, installer::GetProgIdForFileType(), std::wstring())); \ + return; \ + } + +// Give BraveXXFile prog id for some file type.(ex, .pdf or .svg) instead of +// BraveHTML. +#define BRAVE_GET_SHELL_INTEGRATION_ENTRIES \ + const std::wstring file_ext = ShellUtil::kPotentialFileAssociations[i]; \ + if (installer::ShouldUseFileTypeProgId(file_ext)) { \ + entries->push_back(std::make_unique( \ + capabilities + L"\\FileAssociations", file_ext, \ + installer::GetProgIdForFileType())); \ + continue; \ + } +#else +#define BRAVE_GET_CHROME_PROG_ID_ENTRIES +#define BRAVE_GET_APP_EXT_REGISTRATION_ENTRIES +#define BRAVE_GET_SHELL_INTEGRATION_ENTRIES +#endif + #include "../../../../../chrome/installer/util/shell_util.cc" +#undef BRAVE_GET_SHELL_INTEGRATION_ENTRIES +#undef BRAVE_GET_APP_EXT_REGISTRATION_ENTRIES +#undef BRAVE_GET_CHROME_PROG_ID_ENTRIES #undef BRAVE_GET_TARGET_FOR_DEFAULT_APP_SETTINGS #undef BRAVE_IPFS #undef BRAVE_IPNS diff --git a/chromium_src/chrome/installer/util/sources.gni b/chromium_src/chrome/installer/util/sources.gni new file mode 100644 index 00000000000..d8a78c35024 --- /dev/null +++ b/chromium_src/chrome/installer/util/sources.gni @@ -0,0 +1,16 @@ +# Copyright (c) 2021 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/. + +brave_chromium_src_chrome_installer_util_sources = [] +brave_chromium_src_chrome_installer_util_deps = [] + +if (is_win) { + brave_chromium_src_chrome_installer_util_deps += [ + "//brave/installer/util", + "//chrome/common:non_code_constants", + "//chrome/install_static:install_static_util", + "//components/version_info", + ] +} diff --git a/installer/util/BUILD.gn b/installer/util/BUILD.gn new file mode 100644 index 00000000000..bf7b4bd2a99 --- /dev/null +++ b/installer/util/BUILD.gn @@ -0,0 +1,12 @@ +source_set("util") { + sources = [ + "brave_shell_util.cc", + "brave_shell_util.h", + ] + + deps = [ + "//base", + "//chrome/install_static:install_static_util", + "//components/version_info", + ] +} diff --git a/installer/util/DEPS b/installer/util/DEPS new file mode 100644 index 00000000000..30e9887a42b --- /dev/null +++ b/installer/util/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+chrome/install_static", + "+components/version_info", +] diff --git a/installer/util/brave_shell_util.cc b/installer/util/brave_shell_util.cc new file mode 100644 index 00000000000..340b98e18ce --- /dev/null +++ b/installer/util/brave_shell_util.cc @@ -0,0 +1,34 @@ +/* Copyright (c) 2021 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/. */ + +#include "brave/installer/util/brave_shell_util.h" + +#include "base/notreached.h" +#include "chrome/install_static/install_util.h" +#include "components/version_info/channel.h" + +namespace installer { + +std::wstring GetProgIdForFileType() { + switch (install_static::GetChromeChannel()) { + case version_info::Channel::STABLE: + return L"BraveFile"; + case version_info::Channel::BETA: + return L"BraveBFile"; + case version_info::Channel::DEV: + return L"BraveDFile"; + case version_info::Channel::CANARY: + return L"BraveSSFile"; + default: + NOTREACHED(); + return L"BraveFile"; + } +} + +bool ShouldUseFileTypeProgId(const std::wstring& ext) { + return (ext == L".pdf" || ext == L".svg"); +} + +} // namespace installer diff --git a/installer/util/brave_shell_util.h b/installer/util/brave_shell_util.h new file mode 100644 index 00000000000..dd5e299ca70 --- /dev/null +++ b/installer/util/brave_shell_util.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2021 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/. */ + +#ifndef BRAVE_INSTALLER_UTIL_BRAVE_SHELL_UTIL_H_ +#define BRAVE_INSTALLER_UTIL_BRAVE_SHELL_UTIL_H_ + +#include + +namespace installer { + +std::wstring GetProgIdForFileType(); +bool ShouldUseFileTypeProgId(const std::wstring& ext); + +} // namespace installer + +#endif // BRAVE_INSTALLER_UTIL_BRAVE_SHELL_UTIL_H_ diff --git a/patches/chrome-installer-setup-BUILD.gn.patch b/patches/chrome-installer-setup-BUILD.gn.patch new file mode 100644 index 00000000000..13487483073 --- /dev/null +++ b/patches/chrome-installer-setup-BUILD.gn.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/installer/setup/BUILD.gn b/chrome/installer/setup/BUILD.gn +index db3796b6b6ef7c7c60cd6d75e93259c1a5edc364..e6fa111a618efea3ff70b55b75ed9c9297c4d040 100644 +--- a/chrome/installer/setup/BUILD.gn ++++ b/chrome/installer/setup/BUILD.gn +@@ -49,6 +49,7 @@ if (is_win) { + ] + + libs = [ "netapi32.lib" ] ++ import("//brave/chromium_src/chrome/installer/setup/sources.gni") deps += brave_chromium_src_chrome_installer_setup_deps sources+= brave_chromium_src_chrome_installer_setup_sources + } + + static_library("lib") { diff --git a/patches/chrome-installer-util-BUILD.gn.patch b/patches/chrome-installer-util-BUILD.gn.patch index f7fd7bff61f..3efb5a9beff 100644 --- a/patches/chrome-installer-util-BUILD.gn.patch +++ b/patches/chrome-installer-util-BUILD.gn.patch @@ -1,8 +1,16 @@ diff --git a/chrome/installer/util/BUILD.gn b/chrome/installer/util/BUILD.gn -index 2ea95551d977717045804377090c4e57bb4e0518..c3af7ec8bad26ee56ee5b2a786c1c8ece82f6e7b 100644 +index 2ea95551d977717045804377090c4e57bb4e0518..6859e33daa7de44c2b53601163bc6949bdebbd0c 100644 --- a/chrome/installer/util/BUILD.gn +++ b/chrome/installer/util/BUILD.gn -@@ -225,7 +225,18 @@ generate_embedded_i18n("generate_strings") { +@@ -190,6 +190,7 @@ static_library("with_no_strings") { + "initial_preferences.h", + ] + } ++ import("//brave/chromium_src/chrome/installer/util/sources.gni") deps += brave_chromium_src_chrome_installer_util_deps sources += brave_chromium_src_chrome_installer_util_sources + } + + # Use this version of installer_util to link to the generated strings in .rc +@@ -225,7 +226,18 @@ generate_embedded_i18n("generate_strings") { output_file_name_base = "installer_util_strings" diff --git a/patches/chrome-installer-util-shell_util.cc.patch b/patches/chrome-installer-util-shell_util.cc.patch index 9192911dd53..e3600cf2da5 100644 --- a/patches/chrome-installer-util-shell_util.cc.patch +++ b/patches/chrome-installer-util-shell_util.cc.patch @@ -1,8 +1,32 @@ diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc -index 3e81aacae5b091da6718b4394289605b86400c02..863f01c37945abb0219ea46bfb07370d6fb2bfe2 100644 +index 3e81aacae5b091da6718b4394289605b86400c02..af09cf6ba8489196d049fb2044a5bc3d4a58a9c6 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc -@@ -754,6 +754,7 @@ std::wstring GetTargetForDefaultAppsSettings(const wchar_t* protocol) { +@@ -392,6 +392,7 @@ void GetChromeProgIdEntries( + app_info.delegate_clsid = install_static::GetLegacyCommandExecuteImplClsid(); + + GetProgIdEntries(app_info, entries); ++ BRAVE_GET_CHROME_PROG_ID_ENTRIES + + if (!app_info.delegate_clsid.empty()) { + auto delegate_execute_entries = +@@ -488,6 +489,7 @@ void GetShellIntegrationEntries( + + const std::wstring html_prog_id(GetBrowserProgId(suffix)); + for (int i = 0; ShellUtil::kPotentialFileAssociations[i] != nullptr; i++) { ++ BRAVE_GET_SHELL_INTEGRATION_ENTRIES + entries->push_back(std::make_unique( + capabilities + L"\\FileAssociations", + ShellUtil::kPotentialFileAssociations[i], html_prog_id)); +@@ -514,6 +516,7 @@ void GetAppExtRegistrationEntries( + key_name.append(ext); + key_name.push_back(base::FilePath::kSeparators[0]); + key_name.append(ShellUtil::kRegOpenWithProgids); ++ BRAVE_GET_APP_EXT_REGISTRATION_ENTRIES + entries->push_back( + std::make_unique(key_name, prog_id, std::wstring())); + } +@@ -754,6 +757,7 @@ std::wstring GetTargetForDefaultAppsSettings(const wchar_t* protocol) { return base::StringPrintf(kSystemSettingsDefaultAppsFormat, L"Browser"); if (base::EqualsCaseInsensitiveASCII(protocol, L"mailto")) return base::StringPrintf(kSystemSettingsDefaultAppsFormat, L"Email"); @@ -10,7 +34,7 @@ index 3e81aacae5b091da6718b4394289605b86400c02..863f01c37945abb0219ea46bfb07370d return L"SettingsPageAppsDefaultsProtocolView"; } -@@ -1661,8 +1662,10 @@ const wchar_t* ShellUtil::kPotentialFileAssociations[] = { +@@ -1661,8 +1665,10 @@ const wchar_t* ShellUtil::kPotentialFileAssociations[] = { L".htm", L".html", L".pdf", L".shtml", L".svg", L".xht", L".xhtml", L".webp", nullptr}; const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"ftp", L"http",