2009-10-06 21:42:45 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2009-10-06 21:42:45 +00:00
|
|
|
|
|
|
|
#ifndef __JumpListBuilder_h__
|
|
|
|
#define __JumpListBuilder_h__
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#undef NTDDI_VERSION
|
|
|
|
#define NTDDI_VERSION NTDDI_WIN7
|
|
|
|
// Needed for various com interfaces
|
|
|
|
#include <shobjidl.h>
|
2013-12-16 00:00:54 +00:00
|
|
|
#undef LogSeverity // SetupAPI.h #defines this as DWORD
|
2009-10-06 21:42:45 +00:00
|
|
|
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsIMutableArray.h"
|
|
|
|
|
|
|
|
#include "nsIJumpListBuilder.h"
|
|
|
|
#include "nsIJumpListItem.h"
|
|
|
|
#include "JumpListItem.h"
|
2011-09-06 19:11:28 +00:00
|
|
|
#include "nsIObserver.h"
|
2012-06-14 18:28:06 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2009-10-06 21:42:45 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace widget {
|
|
|
|
|
2011-09-06 19:11:28 +00:00
|
|
|
class JumpListBuilder : public nsIJumpListBuilder,
|
|
|
|
public nsIObserver
|
2009-10-06 21:42:45 +00:00
|
|
|
{
|
2014-07-17 20:46:26 +00:00
|
|
|
virtual ~JumpListBuilder();
|
|
|
|
|
2009-10-06 21:42:45 +00:00
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIJUMPLISTBUILDER
|
2011-09-06 19:11:28 +00:00
|
|
|
NS_DECL_NSIOBSERVER
|
2009-10-06 21:42:45 +00:00
|
|
|
|
|
|
|
JumpListBuilder();
|
|
|
|
|
|
|
|
protected:
|
2011-09-29 06:19:26 +00:00
|
|
|
static bool sBuildingList;
|
2009-10-06 21:42:45 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
nsRefPtr<ICustomDestinationList> mJumpListMgr;
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t mMaxItems;
|
2011-09-29 06:19:26 +00:00
|
|
|
bool mHasCommit;
|
2011-09-06 19:11:28 +00:00
|
|
|
nsCOMPtr<nsIThread> mIOThread;
|
2009-10-06 21:42:45 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool IsSeparator(nsCOMPtr<nsIJumpListItem>& item);
|
2009-10-06 21:42:45 +00:00
|
|
|
nsresult TransferIObjectArrayToIMutableArray(IObjectArray *objArray, nsIMutableArray *removedItems);
|
2011-09-06 19:11:28 +00:00
|
|
|
nsresult RemoveIconCacheForItems(nsIMutableArray *removedItems);
|
2011-09-06 19:11:28 +00:00
|
|
|
nsresult RemoveIconCacheForAllItems();
|
2009-10-06 21:42:45 +00:00
|
|
|
|
|
|
|
friend class WinTaskbar;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace widget
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif /* __JumpListBuilder_h__ */
|
|
|
|
|