Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* vim: se cin sw=2 ts=2 et : */ |
michael@0 | 2 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 3 | * |
michael@0 | 4 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef __mozilla_widget_TaskbarPreviewButton_h__ |
michael@0 | 9 | #define __mozilla_widget_TaskbarPreviewButton_h__ |
michael@0 | 10 | |
michael@0 | 11 | #include <windows.h> |
michael@0 | 12 | #include <shobjidl.h> |
michael@0 | 13 | #undef LogSeverity // SetupAPI.h #defines this as DWORD |
michael@0 | 14 | |
michael@0 | 15 | #include <nsITaskbarPreviewButton.h> |
michael@0 | 16 | #include <nsAutoPtr.h> |
michael@0 | 17 | #include <nsString.h> |
michael@0 | 18 | #include <nsWeakReference.h> |
michael@0 | 19 | |
michael@0 | 20 | namespace mozilla { |
michael@0 | 21 | namespace widget { |
michael@0 | 22 | |
michael@0 | 23 | class TaskbarWindowPreview; |
michael@0 | 24 | class TaskbarPreviewButton : public nsITaskbarPreviewButton, public nsSupportsWeakReference |
michael@0 | 25 | { |
michael@0 | 26 | public: |
michael@0 | 27 | TaskbarPreviewButton(TaskbarWindowPreview* preview, uint32_t index); |
michael@0 | 28 | virtual ~TaskbarPreviewButton(); |
michael@0 | 29 | |
michael@0 | 30 | NS_DECL_ISUPPORTS |
michael@0 | 31 | NS_DECL_NSITASKBARPREVIEWBUTTON |
michael@0 | 32 | |
michael@0 | 33 | private: |
michael@0 | 34 | THUMBBUTTON& Button(); |
michael@0 | 35 | nsresult Update(); |
michael@0 | 36 | |
michael@0 | 37 | nsRefPtr<TaskbarWindowPreview> mPreview; |
michael@0 | 38 | uint32_t mIndex; |
michael@0 | 39 | nsString mTooltip; |
michael@0 | 40 | nsCOMPtr<imgIContainer> mImage; |
michael@0 | 41 | }; |
michael@0 | 42 | |
michael@0 | 43 | } // namespace widget |
michael@0 | 44 | } // namespace mozilla |
michael@0 | 45 | |
michael@0 | 46 | #endif /* __mozilla_widget_TaskbarPreviewButton_h__ */ |
michael@0 | 47 |