michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __JumpListBuilder_h__ michael@0: #define __JumpListBuilder_h__ michael@0: michael@0: #include michael@0: michael@0: #undef NTDDI_VERSION michael@0: #define NTDDI_VERSION NTDDI_WIN7 michael@0: // Needed for various com interfaces michael@0: #include michael@0: #undef LogSeverity // SetupAPI.h #defines this as DWORD michael@0: michael@0: #include "nsString.h" michael@0: #include "nsIMutableArray.h" michael@0: michael@0: #include "nsIJumpListBuilder.h" michael@0: #include "nsIJumpListItem.h" michael@0: #include "JumpListItem.h" michael@0: #include "nsIObserver.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: namespace mozilla { michael@0: namespace widget { michael@0: michael@0: class JumpListBuilder : public nsIJumpListBuilder, michael@0: public nsIObserver michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIJUMPLISTBUILDER michael@0: NS_DECL_NSIOBSERVER michael@0: michael@0: JumpListBuilder(); michael@0: virtual ~JumpListBuilder(); michael@0: michael@0: protected: michael@0: static bool sBuildingList; michael@0: michael@0: private: michael@0: nsRefPtr mJumpListMgr; michael@0: uint32_t mMaxItems; michael@0: bool mHasCommit; michael@0: nsCOMPtr mIOThread; michael@0: michael@0: bool IsSeparator(nsCOMPtr& item); michael@0: nsresult TransferIObjectArrayToIMutableArray(IObjectArray *objArray, nsIMutableArray *removedItems); michael@0: nsresult RemoveIconCacheForItems(nsIMutableArray *removedItems); michael@0: nsresult RemoveIconCacheForAllItems(); michael@0: michael@0: friend class WinTaskbar; michael@0: }; michael@0: michael@0: } // namespace widget michael@0: } // namespace mozilla michael@0: michael@0: #endif /* __JumpListBuilder_h__ */ michael@0: