2014-05-30 02:31:27 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_BROWSER_UI_TRAY_ICON_COCOA_H_
|
|
|
|
#define ATOM_BROWSER_UI_TRAY_ICON_COCOA_H_
|
|
|
|
|
2014-05-30 06:37:53 +00:00
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2014-05-30 02:31:27 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "atom/browser/ui/tray_icon.h"
|
2014-05-30 06:37:53 +00:00
|
|
|
#include "base/mac/scoped_nsobject.h"
|
|
|
|
|
|
|
|
@class AtomMenuController;
|
2014-06-02 03:28:23 +00:00
|
|
|
@class StatusItemController;
|
2014-05-30 02:31:27 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
class TrayIconCocoa : public TrayIcon {
|
|
|
|
public:
|
2014-05-30 15:57:54 +00:00
|
|
|
TrayIconCocoa();
|
|
|
|
virtual ~TrayIconCocoa();
|
|
|
|
|
2014-05-30 02:31:27 +00:00
|
|
|
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
|
|
|
|
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
|
|
|
|
virtual void SetToolTip(const std::string& tool_tip) OVERRIDE;
|
2014-05-30 06:37:53 +00:00
|
|
|
virtual void SetContextMenu(ui::SimpleMenuModel* menu_model) OVERRIDE;
|
2014-05-30 02:31:27 +00:00
|
|
|
|
|
|
|
private:
|
2014-05-30 06:37:53 +00:00
|
|
|
base::scoped_nsobject<NSStatusItem> item_;
|
|
|
|
|
2014-06-02 03:28:23 +00:00
|
|
|
base::scoped_nsobject<StatusItemController> controller_;
|
|
|
|
|
2014-05-30 06:37:53 +00:00
|
|
|
// Status menu shown when right-clicking the system icon.
|
|
|
|
base::scoped_nsobject<AtomMenuController> menu_;
|
|
|
|
|
2014-05-30 02:31:27 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(TrayIconCocoa);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_BROWSER_UI_TRAY_ICON_COCOA_H_
|