Commit Graph

121 Commits

Author SHA1 Message Date
Dave Townsend
6fe220c9fd Bug 1937061: Hide new profile instances from the recent applications section of the dock. r=nika,spohl,profiles-reviewers,jhirsch
Adds an API to nsIMacDockSupport to allow launching an application bundle and hiding it from the
list of recent applications.

Differential Revision: https://phabricator.services.mozilla.com/D238206
2025-03-06 14:28:08 +00:00
Butkovits Atila
847b25f4e8 Backed out changeset 72ea1c22c996 (bug 1937061) for causing failures at test_delete_last_profile.js. 2025-03-06 15:06:44 +02:00
Dave Townsend
8c83e98f5e Bug 1937061: Hide new profile instances from the recent applications section of the dock. r=nika,spohl,profiles-reviewers,jhirsch
Adds an API to nsIMacDockSupport to allow launching an application bundle and hiding it from the
list of recent applications.

Differential Revision: https://phabricator.services.mozilla.com/D238206
2025-03-06 11:32:40 +00:00
Niklas Baumgardner
1fdd122166 Bug 1927925 - Allow last profile to be deleted via SelectableProfileService. r=profiles-reviewers,jhirsch,mossop
Differential Revision: https://phabricator.services.mozilla.com/D239158
2025-03-04 17:18:25 +00:00
Sandor Molnar
45772aceef Backed out changeset 3f5fd40efb0f (bug 1927925) for causing xpc failures @ test_delete_last_profile.js CLOSED TREE 2025-03-03 18:03:46 +02:00
Niklas Baumgardner
811a886162 Bug 1927925 - Allow last profile to be deleted via SelectableProfileService. r=profiles-reviewers,jhirsch,mossop
Differential Revision: https://phabricator.services.mozilla.com/D239158
2025-03-03 15:11:53 +00:00
Cieara Meador
84808154a0 Bug 1936632 - Enable Profiles pref if enrolled in experiment r=emcminn,profiles-reviewers,mossop,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D239216
2025-02-27 16:51:20 +00:00
Niklas Baumgardner
fb210d2cf0 Bug 1927193 - Read color values for default theme in profiles themeObserver. r=profiles-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D237943
2025-02-19 19:33:36 +00:00
Dave Townsend
16739ed121 Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-18 11:28:15 +00:00
Goloman Adrian
0e650176ac Backed out changeset 23237bed6270 (bug 1927808) for causing xpc failures @test_sync_warning_dialogs.js. CLOSED TREE 2025-02-17 13:45:43 +02:00
Dave Townsend
9ae2b19dba Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-17 10:52:15 +00:00
Goloman Adrian
260e6fa6bb Backed out changeset cc9c1dbec866 (bug 1927808) for causing multiple failures. CLOSED TREE 2025-02-17 12:20:26 +02:00
Dave Townsend
b4ae0c1ece Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-17 09:07:43 +00:00
Dave Townsend
906a8c5f30 Bug 1945207: Open URLs passed via NSApplicationDelegate in the correct profile. r=jhirsch,profiles-reviewers
Unlike other platforms on macOS if Firefox is already running and an application wants to open a URL
it doesn't use a command line call. Instead the URLs are passed via the NSApplicationDelegate
instance, our implementation of that creates a new nsICommandLine and runs it through the existing
handlers. This entirely skips the startup logic for choosing the default profile and so URLs are
simply opened in whatever profile happens to be running. Not sure what the precise logic is when
multiple profiles are running, it seems like the oldest one wins, not the most recently used one
which is what we want.

Here we intercept the new command line, attempt to guess if we may need to send it to a different
profile and if so do so by using the normal command line approach which will then use the startup
logic to choose the correct profile to use.

One niggle to this is that macOS also automatically focuses the existing instance of Firefox prior
to sending us the URLs which causes us to immediately switch the default profile. This patch
introduces a delay to that so we process the URLs before the default profile can change.

Differential Revision: https://phabricator.services.mozilla.com/D237221
2025-02-14 14:32:37 +00:00
Norisz Fay
a8aa5a296d Backed out changeset b30669a3b55f (bug 1945207) for causing bc failures on browser_update_profile_on_window_switch.js 2025-02-13 13:10:07 +02:00
Dave Townsend
b624e1ec3a Bug 1945207: Open URLs passed via NSApplicationDelegate in the correct profile. r=jhirsch,profiles-reviewers
Unlike other platforms on macOS if Firefox is already running and an application wants to open a URL
it doesn't use a command line call. Instead the URLs are passed via the NSApplicationDelegate
instance, our implementation of that creates a new nsICommandLine and runs it through the existing
handlers. This entirely skips the startup logic for choosing the default profile and so URLs are
simply opened in whatever profile happens to be running. Not sure what the precise logic is when
multiple profiles are running, it seems like the oldest one wins, not the most recently used one
which is what we want.

Here we intercept the new command line, attempt to guess if we may need to send it to a different
profile and if so do so by using the normal command line approach which will then use the startup
logic to choose the correct profile to use.

One niggle to this is that macOS also automatically focuses the existing instance of Firefox prior
to sending us the URLs which causes us to immediately switch the default profile. This patch
introduces a delay to that so we process the URLs before the default profile can change.

Differential Revision: https://phabricator.services.mozilla.com/D237221
2025-02-13 10:06:41 +00:00
Goloman Adrian
bc8a66a1e1 Backed out changeset 39e6a7e77cfb (bug 1927808) for causing multiple failures. CLOSED TREE 2025-02-06 14:50:21 +02:00
Dave Townsend
89b6c18f30 Bug 1927808: Profiles should remain disabled if BlockAboutProfiles enterprise policy is active. r=mkaply,profiles-reviewers,firefox-desktop-core-reviewers ,Gijs,jhirsch
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D236848
2025-02-06 10:23:36 +00:00
Niklas Baumgardner
04cb067c2d Bug 1936670 - Add alt text to profile avatars. r=profiles-reviewers,fluent-reviewers,jhirsch,flod
Differential Revision: https://phabricator.services.mozilla.com/D235056
2025-01-28 18:49:11 +00:00
Dave Townsend
f4f8b6ccb5 Bug 1931299: Update the taskbar overlay whenever a window activates. r=profiles-reviewers,niklas
Differential Revision: https://phabricator.services.mozilla.com/D235146
2025-01-22 15:31:35 +00:00
Dave Townsend
071a9a4194 Bug 1933422: Set the current profile as the default for the group immediately after launching. r=profiles-reviewers,jhirsch
We set the current profile as default whenever a window activates, but we don't add that listener
until after the first window has activated so the default remains the previous profile until you
change window focus. This always sets the default immediately on startup.

Differential Revision: https://phabricator.services.mozilla.com/D234670
2025-01-17 19:25:01 +00:00
Niklas Baumgardner
05cf0080f5 Bug 1933147 - Initialize user prefs for selectable profile window. r=mossop,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D231954
2025-01-13 17:33:46 +00:00
Dave Townsend
48f5fd3bcf Bug 1934218: Always flush the profile data to disk when changing the selector state or switching windows. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D232623
2025-01-08 15:11:19 +00:00
Sandor Molnar
ce7ef748cb Backed out changeset 19d40900062f (bug 1934218) for causing bc failures @ browser_update_profile_on_window_switch.js CLOSED TREE 2025-01-07 17:02:11 +02:00
Dave Townsend
d3a9a8ee2e Bug 1934218: Always flush the profile data to disk when changing the selector state or switching windows. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D232623
2025-01-07 14:06:31 +00:00
Niklas Baumgardner
0f7ec7d1ef Bug 1919600 - Update window title to include profile name. r=jhirsch,mossop,fluent-reviewers,tabbrowser-reviewers,bolsson,dao
Differential Revision: https://phabricator.services.mozilla.com/D230958
2024-12-19 20:46:00 +00:00
Goloman Adrian
8893c682ad Backed out changeset b732fa6b4026 (bug 1919600) for causing bc failures @browser_preferences_usage.js. CLOSED TREE 2024-12-19 19:47:31 +02:00
Niklas Baumgardner
99881abf10 Bug 1919600 - Update window title to include profile name. r=jhirsch,mossop,fluent-reviewers,tabbrowser-reviewers,bolsson,dao
Differential Revision: https://phabricator.services.mozilla.com/D230958
2024-12-19 16:07:05 +00:00
Jared Hirsch
2c96f01523 Bug 1918813 - Record an event when we update the default profile in a group. r=niklas,chutten
Differential Revision: https://phabricator.services.mozilla.com/D228127
2024-12-19 01:31:14 +00:00
Jared Hirsch
545de6bdb9 Bug 1931110 - Update async flush behavior to flush the group profile, not the current profile. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D228922
2024-12-18 22:31:28 +00:00
Jared Hirsch
640c9c9605 Bug 1933911 - Show the profile selector window on first restart after creating multiple profiles. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D232015
2024-12-18 22:30:41 +00:00
Dave Townsend
b30ec04bcb Bug 1933756: Keep a strong reference to the taskbar icon controller as long as the window is alive. r=jhirsch
A window's icon controller is only held weakly by the widget code and once it is destroyed it
appears to completely remove the taskbar entry for that window. This maintains a strong reference
the the icon controller once created until the window that owns it is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D231089
2024-12-05 09:35:46 +00:00
Dave Townsend
68cdb43963 Bug 1931982: Fix the startup profile UI to correctly signal back to nsAppRunner what profile needs to launch. r=jhirsch
When displaying the profile selector on startup we cannot use the normal method of launching a
selected profile by simply launching an new instance of Firefox. This would lose all state from
the original process including any passed command line arguments. Instead we must signal back to
nsAppRunner what profile it should launch. We also need to properly shut down the sqlite database
before shutdown begins as our normal hook isn't in place and the process crashes if the database
hasn't been shut down correctly.

Differential Revision: https://phabricator.services.mozilla.com/D229921
2024-11-27 09:18:52 +00:00
Butkovits Atila
3441807fa1 Backed out changeset e4a8608d96d5 (bug 1931982) for causing failures at test_first_startup.py. CLOSED TREE 2024-11-26 15:54:00 +02:00
Dave Townsend
fc5276df54 Bug 1931982: Fix the startup profile UI to correctly signal back to nsAppRunner what profile needs to launch. r=jhirsch
When displaying the profile selector on startup we cannot use the normal method of launching a
selected profile by simply launching an new instance of Firefox. This would lose all state from
the original process including any passed command line arguments. Instead we must signal back to
nsAppRunner what profile it should launch. We also need to properly shut down the sqlite database
before shutdown begins as our normal hook isn't in place and the process crashes if the database
hasn't been shut down correctly.

Differential Revision: https://phabricator.services.mozilla.com/D229921
2024-11-26 09:21:46 +00:00
Niklas Baumgardner
b339a1b405 Bug 1927572 - Set favicon for profiles pages. r=jhirsch,dao,desktop-theme-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228374
2024-11-21 14:55:51 +00:00
Dave Townsend
98d3aef0de Bug 1924827: Open "manage profiles" in dialog not tab. r=niklas,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D228384
2024-11-18 11:13:52 +00:00
Butkovits Atila
4360b44af9 Backed out changeset d4dbcbf90396 (bug 1924827) for causing failures at browser_test_profile_selector.js. CLOSED TREE 2024-11-14 00:49:30 +02:00
Dave Townsend
fc84eba9be Bug 1924827: Open "manage profiles" in dialog not tab. r=niklas,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D228384
2024-11-13 21:21:26 +00:00
Dave Townsend
cc2ef1acd0 Bug 1926507: Badge the taskbar/dock with the profile avatar. r=niklas,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D228439
2024-11-13 10:36:05 +00:00
Dave Townsend
5528131bd3 Bug 1929307: Import prefs from SharedPrefs at startup rather than clobbering them. r=jhirsch,niklas
This also stops sharing browser.profiles.enabled and toolkit.profiles.storeID. In the first case
I want to minimise any risk of this preference getting set to false by accident because then a
user loses all of their profiles. In the latter case there is no point storing it in the database,
we already have a backup mechanism for it and if we have lost the storeID we can't load the database
anyway.

Differential Revision: https://phabricator.services.mozilla.com/D228174
2024-11-13 10:36:04 +00:00
Norisz Fay
bb0e3d5b06 Backed out 2 changesets (bug 1929307, bug 1926507) for causing xpcshell failures on test_selectable_profiles_lifecycle.js CLOSED TREE
Backed out changeset afc3edd5dbb1 (bug 1926507)
Backed out changeset 1f900c8a06e0 (bug 1929307)
2024-11-12 21:03:11 +02:00
Dave Townsend
28dd1a2275 Bug 1926507: Badge the taskbar/dock with the profile avatar. r=niklas,jhirsch
Differential Revision: https://phabricator.services.mozilla.com/D228439
2024-11-12 15:16:46 +00:00
Dave Townsend
511fbaa6f8 Bug 1929307: Import prefs from SharedPrefs at startup rather than clobbering them. r=jhirsch,niklas
This also stops sharing browser.profiles.enabled and toolkit.profiles.storeID. In the first case
I want to minimise any risk of this preference getting set to false by accident because then a
user loses all of their profiles. In the latter case there is no point storing it in the database,
we already have a backup mechanism for it and if we have lost the storeID we can't load the database
anyway.

Differential Revision: https://phabricator.services.mozilla.com/D228174
2024-11-12 15:16:46 +00:00
Jared Hirsch
a88a8a7c29 Bug 1928738: Change the localized name of the default profile. r=niklas,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D227759
2024-11-09 03:02:38 +00:00
Dave Townsend
5f09e48599 Bug 1927576: Clicking on another profile in the menu should switch app focus, not open a new window. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D228154
2024-11-08 10:58:41 +00:00
Dave Townsend
fa4eabb690 Bug 1929287: Ignore errors from unregistering observer notification. r=niklas
Differential Revision: https://phabricator.services.mozilla.com/D227980
2024-11-07 15:10:22 +00:00
Niklas Baumgardner
66f7bd8a4d Bug 1926946 - Add special case for setting theme to system deault in SelectableProfileService. r=jhirsch,emilio
Differential Revision: https://phabricator.services.mozilla.com/D226818
2024-11-06 20:14:04 +00:00
Niklas Baumgardner
57ef5b5f32 Bug 1926593 - Store themeId in profiles db instead of themeL10nId. r=jhirsch,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226954
2024-11-06 20:14:04 +00:00
Niklas Baumgardner
acfacc68d8 Bug 1927617 - Sort profiles by name. r=jhirsch,mossop
Differential Revision: https://phabricator.services.mozilla.com/D227724
2024-11-06 17:25:23 +00:00