widget/cocoa/nsSystemStatusBarCocoa.h
author Paul Adenot <paul@paul.cx>
Wed, 18 Jul 2018 21:18:28 +0200
changeset 427467 97d89ba5f93dad118fe54358ff70c28a3a33cde5
parent 294169 710324243b622d7b8555769a9676931c04a7ea8c
child 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1148354 - Add a web platform test to test for the non existence of removed methods. r=karlt MozReview-Commit-ID: 6DoZQJN8JRA

/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
/* 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/. */

#ifndef nsSystemStatusBarCocoa_h_
#define nsSystemStatusBarCocoa_h_

#include "mozilla/RefPtr.h"
#include "nsISystemStatusBar.h"
#include "nsClassHashtable.h"

class nsStandaloneNativeMenu;
@class NSStatusItem;

class nsSystemStatusBarCocoa : public nsISystemStatusBar
{
public:
  nsSystemStatusBarCocoa() {}

  NS_DECL_ISUPPORTS
  NS_DECL_NSISYSTEMSTATUSBAR

protected:
  virtual ~nsSystemStatusBarCocoa() {}

  struct StatusItem
  {
    explicit StatusItem(nsStandaloneNativeMenu* aMenu);
    ~StatusItem();

  private:
    RefPtr<nsStandaloneNativeMenu> mMenu;
    NSStatusItem* mStatusItem;
  };

  nsClassHashtable<nsISupportsHashKey, StatusItem> mItems;
};

#endif // nsSystemStatusBarCocoa_h_