1 /* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifndef nsSystemStatusBarCocoa_h_ 7 #define nsSystemStatusBarCocoa_h_ 8 9 #include "mozilla/RefPtr.h" 10 #include "nsISystemStatusBar.h" 11 #include "nsClassHashtable.h" 12 13 namespace mozilla::widget { 14 class NativeMenuMac; 15 } 16 @class NSStatusItem; 17 18 class nsSystemStatusBarCocoa : public nsISystemStatusBar { 19 public: nsSystemStatusBarCocoa()20 nsSystemStatusBarCocoa() {} 21 22 NS_DECL_ISUPPORTS 23 NS_DECL_NSISYSTEMSTATUSBAR 24 25 protected: ~nsSystemStatusBarCocoa()26 virtual ~nsSystemStatusBarCocoa() {} 27 28 struct StatusItem { 29 explicit StatusItem(mozilla::widget::NativeMenuMac* aMenu); 30 ~StatusItem(); 31 32 private: 33 RefPtr<mozilla::widget::NativeMenuMac> mMenu; 34 NSStatusItem* mStatusItem; 35 }; 36 37 nsClassHashtable<nsISupportsHashKey, StatusItem> mItems; 38 }; 39 40 #endif // nsSystemStatusBarCocoa_h_ 41