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