Bug 1880109 - Remove legacy JumpListBuilder usage in WinTaskbar. r=rkraesig,win-reviewers

Depends on D210543

Differential Revision: https://phabricator.services.mozilla.com/D210544
This commit is contained in:
Mike Conley 2024-06-13 01:17:59 +00:00
parent 41d10e9625
commit e8d2c5ea1c
2 changed files with 1 additions and 40 deletions

View File

@ -15,7 +15,6 @@ interface nsITaskbarWindowPreview;
interface nsITaskbarPreviewController;
interface nsITaskbarProgress;
interface nsITaskbarOverlayIconController;
interface nsILegacyJumpListBuilder;
interface mozIDOMWindow;
/*
@ -47,7 +46,7 @@ interface mozIDOMWindow;
* http://msdn.microsoft.com/en-us/library/dd391697%28VS.85%29.aspx
*
* Applications may also define custom taskbar jump lists on application shortcuts.
* See nsILegacyJumpListBuilder for more information.
* See nsIJumpListBuilder for more information.
*/
[scriptable, uuid(11751471-9246-4c72-a80f-0c7df765d640)]
@ -120,19 +119,6 @@ interface nsIWinTaskbar : nsISupports
* Taskbar and start menu jump list management
*/
/**
* Retrieve a legacy taskbar jump list builder. This jump list builder backend
* is in the process of being phased out.
*
* Fails if a jump list build operation has already been initiated, developers
* should make use of a single instance of nsILegacyJumpListBuilder for building lists
* within an application.
*
* @throws NS_ERROR_ALREADY_INITIALIZED if an nsILegacyJumpListBuilder instance is
* currently building a list.
*/
nsILegacyJumpListBuilder createLegacyJumpListBuilder(in boolean aPrivateBrowsing);
/**
* Retrieves a Windows Jump List builder. This jump list builder can be used
* to asynchronously add, remove, and update items in the Windows Jump List.

View File

@ -18,13 +18,11 @@
#include <nsIBaseWindow.h>
#include <nsServiceManagerUtils.h>
#include "nsIXULAppInfo.h"
#include "nsILegacyJumpListBuilder.h"
#include "nsUXThemeData.h"
#include "nsWindow.h"
#include "WinUtils.h"
#include "TaskbarTabPreview.h"
#include "TaskbarWindowPreview.h"
#include "LegacyJumpListBuilder.h"
#include "nsWidgetsCID.h"
#include "nsPIDOMWindow.h"
#include "nsAppDirectoryServiceDefs.h"
@ -37,9 +35,6 @@
#include <propkey.h>
#include <shellapi.h>
static NS_DEFINE_CID(kLegacyJumpListBuilderCID,
NS_WIN_LEGACYJUMPLISTBUILDER_CID);
namespace {
HWND GetHWNDFromDocShell(nsIDocShell* aShell) {
@ -410,26 +405,6 @@ WinTaskbar::GetOverlayIconController(
return CallQueryInterface(preview, _retval);
}
NS_IMETHODIMP
WinTaskbar::CreateLegacyJumpListBuilder(
bool aPrivateBrowsing, nsILegacyJumpListBuilder** aJumpListBuilder) {
nsresult rv;
if (LegacyJumpListBuilder::sBuildingList) return NS_ERROR_ALREADY_INITIALIZED;
nsCOMPtr<nsILegacyJumpListBuilder> builder =
do_CreateInstance(kLegacyJumpListBuilderCID, &rv);
if (NS_FAILED(rv)) return NS_ERROR_UNEXPECTED;
NS_IF_ADDREF(*aJumpListBuilder = builder);
nsAutoString aumid;
GenerateAppUserModelID(aumid, aPrivateBrowsing);
builder->SetAppUserModelID(aumid);
return NS_OK;
}
NS_IMETHODIMP
WinTaskbar::CreateJumpListBuilder(bool aPrivateBrowsing,
nsIJumpListBuilder** aJumpListBuilder) {