зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1766636: set private window feature correctly for profile manager window, to ensure they use the correct windows taskbar icon r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D152462
This commit is contained in:
Родитель
622826bf1d
Коммит
5be6666af9
|
@ -2908,11 +2908,17 @@ static ReturnAbortOnError ShowProfileManager(
|
|||
nsCOMPtr<nsIAppStartup> appStartup(components::AppStartup::Service());
|
||||
NS_ENSURE_TRUE(appStartup, NS_ERROR_FAILURE);
|
||||
|
||||
nsAutoCString features("centerscreen,chrome,modal,titlebar");
|
||||
// If we're launching a private browsing window make sure to set that
|
||||
// feature for the Profile Manager window as well, so it groups correctly
|
||||
// on the Windows taskbar.
|
||||
if (CheckArgExists("private-window") == ARG_FOUND) {
|
||||
features.AppendLiteral(",private");
|
||||
}
|
||||
nsCOMPtr<mozIDOMWindowProxy> newWindow;
|
||||
rv = windowWatcher->OpenWindow(
|
||||
nullptr, nsDependentCString(kProfileManagerURL), "_blank"_ns,
|
||||
"centerscreen,chrome,modal,titlebar"_ns, ioParamBlock,
|
||||
getter_AddRefs(newWindow));
|
||||
features, ioParamBlock, getter_AddRefs(newWindow));
|
||||
|
||||
NS_ENSURE_SUCCESS_LOG(rv, rv);
|
||||
|
||||
|
@ -3331,11 +3337,17 @@ static ReturnAbortOnError CheckDowngrade(nsIFile* aProfileDir,
|
|||
|
||||
paramBlock->SetInt(0, flags);
|
||||
|
||||
nsAutoCString features("centerscreen,chrome,modal,titlebar");
|
||||
// If we're launching a private browsing window make sure to set that
|
||||
// feature for the Profile Manager window as well, so it groups correctly
|
||||
// on the Windows taskbar.
|
||||
if (CheckArgExists("private-window") == ARG_FOUND) {
|
||||
features.AppendLiteral(",private");
|
||||
}
|
||||
nsCOMPtr<mozIDOMWindowProxy> newWindow;
|
||||
rv = windowWatcher->OpenWindow(
|
||||
nullptr, nsDependentCString(kProfileDowngradeURL), "_blank"_ns,
|
||||
"centerscreen,chrome,modal,titlebar"_ns, paramBlock,
|
||||
getter_AddRefs(newWindow));
|
||||
features, paramBlock, getter_AddRefs(newWindow));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
paramBlock->GetInt(1, &result);
|
||||
|
|
Загрузка…
Ссылка в новой задаче