@@ -194,16 +194,6 @@ var gProfiles = {
194194 } ) ;
195195 } ,
196196
197- async openTabsInProfile ( aEvent , tabsToOpen ) {
198- let profile = await SelectableProfileService . getProfile (
199- aEvent . target . getAttribute ( "profileid" )
200- ) ;
201- SelectableProfileService . launchInstance (
202- profile ,
203- tabsToOpen . map ( tab => tab . linkedBrowser . currentURI . spec )
204- ) ;
205- } ,
206-
207197 async handleCommand ( aEvent ) {
208198 switch ( aEvent . target . id ) {
209199 /* App menu button events */
@@ -257,16 +247,6 @@ var gProfiles = {
257247 this . launchProfile ( aEvent . sourceEvent ) ;
258248 break ;
259249 }
260- case "Profiles:MoveTabsToProfile" : {
261- let tabs ;
262- if ( TabContextMenu . contextTab . multiselected ) {
263- tabs = gBrowser . selectedTabs ;
264- } else {
265- tabs = [ TabContextMenu . contextTab ] ;
266- }
267- this . openTabsInProfile ( aEvent . sourceEvent , tabs ) ;
268- break ;
269- }
270250 }
271251 /* Subpanel profile events that may be triggered in FxA menu or app menu */
272252 if ( aEvent . target . classList . contains ( "profile-item" ) ) {
@@ -447,50 +427,4 @@ var gProfiles = {
447427 profilesList . appendChild ( button ) ;
448428 }
449429 } ,
450-
451- async populateMoveTabMenu ( menuPopup ) {
452- if ( ! SelectableProfileService . initialized ) {
453- return ;
454- }
455-
456- const profiles = await SelectableProfileService . getAllProfiles ( ) ;
457- const currentProfile = SelectableProfileService . currentProfile ;
458-
459- const separator = document . getElementById ( "moveTabSeparator" ) ;
460- separator . hidden = profiles . length < 2 ;
461-
462- let existingItems = [
463- ...menuPopup . querySelectorAll ( ":scope > menuitem[profileid]" ) ,
464- ] ;
465-
466- for ( let profile of profiles ) {
467- if ( profile . id === currentProfile . id ) {
468- continue ;
469- }
470-
471- let menuitem = existingItems . shift ( ) ;
472- let isNewItem = ! menuitem ;
473- if ( isNewItem ) {
474- menuitem = document . createXULElement ( "menuitem" ) ;
475- menuitem . setAttribute ( "tbattr" , "tabbrowser-multiple-visible" ) ;
476- menuitem . setAttribute ( "data-l10n-id" , "move-to-new-profile" ) ;
477- menuitem . setAttribute ( "command" , "Profiles:MoveTabsToProfile" ) ;
478- }
479-
480- menuitem . disabled = false ;
481- menuitem . setAttribute ( "profileid" , profile . id ) ;
482- menuitem . setAttribute (
483- "data-l10n-args" ,
484- JSON . stringify ( { profileName : profile . name } )
485- ) ;
486-
487- if ( isNewItem ) {
488- menuPopup . appendChild ( menuitem ) ;
489- }
490- }
491- // If there's any old item to remove, do so now.
492- for ( let remaining of existingItems ) {
493- remaining . remove ( ) ;
494- }
495- } ,
496430} ;
0 commit comments