1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/windows/JumpListBuilder.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,61 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef __JumpListBuilder_h__ 1.10 +#define __JumpListBuilder_h__ 1.11 + 1.12 +#include <windows.h> 1.13 + 1.14 +#undef NTDDI_VERSION 1.15 +#define NTDDI_VERSION NTDDI_WIN7 1.16 +// Needed for various com interfaces 1.17 +#include <shobjidl.h> 1.18 +#undef LogSeverity // SetupAPI.h #defines this as DWORD 1.19 + 1.20 +#include "nsString.h" 1.21 +#include "nsIMutableArray.h" 1.22 + 1.23 +#include "nsIJumpListBuilder.h" 1.24 +#include "nsIJumpListItem.h" 1.25 +#include "JumpListItem.h" 1.26 +#include "nsIObserver.h" 1.27 +#include "mozilla/Attributes.h" 1.28 + 1.29 +namespace mozilla { 1.30 +namespace widget { 1.31 + 1.32 +class JumpListBuilder : public nsIJumpListBuilder, 1.33 + public nsIObserver 1.34 +{ 1.35 +public: 1.36 + NS_DECL_ISUPPORTS 1.37 + NS_DECL_NSIJUMPLISTBUILDER 1.38 + NS_DECL_NSIOBSERVER 1.39 + 1.40 + JumpListBuilder(); 1.41 + virtual ~JumpListBuilder(); 1.42 + 1.43 +protected: 1.44 + static bool sBuildingList; 1.45 + 1.46 +private: 1.47 + nsRefPtr<ICustomDestinationList> mJumpListMgr; 1.48 + uint32_t mMaxItems; 1.49 + bool mHasCommit; 1.50 + nsCOMPtr<nsIThread> mIOThread; 1.51 + 1.52 + bool IsSeparator(nsCOMPtr<nsIJumpListItem>& item); 1.53 + nsresult TransferIObjectArrayToIMutableArray(IObjectArray *objArray, nsIMutableArray *removedItems); 1.54 + nsresult RemoveIconCacheForItems(nsIMutableArray *removedItems); 1.55 + nsresult RemoveIconCacheForAllItems(); 1.56 + 1.57 + friend class WinTaskbar; 1.58 +}; 1.59 + 1.60 +} // namespace widget 1.61 +} // namespace mozilla 1.62 + 1.63 +#endif /* __JumpListBuilder_h__ */ 1.64 +