1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_COCOA_STATUS_ICONS_STATUS_ICON_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_STATUS_ICONS_STATUS_ICON_MAC_H_ 7 #pragma once 8 9 #import <Cocoa/Cocoa.h> 10 11 #include "base/memory/scoped_nsobject.h" 12 #include "base/string16.h" 13 #include "chrome/browser/status_icons/status_icon.h" 14 15 class SkBitmap; 16 @class NSStatusItem; 17 @class StatusItemController; 18 19 class StatusIconMac : public StatusIcon { 20 public: 21 StatusIconMac(); 22 virtual ~StatusIconMac(); 23 24 // Overridden from StatusIcon 25 virtual void SetImage(const SkBitmap& image); 26 virtual void SetPressedImage(const SkBitmap& image); 27 virtual void SetToolTip(const string16& tool_tip); 28 virtual void DisplayBalloon(const string16& title, const string16& contents); 29 30 protected: 31 // Overridden from StatusIcon. 32 virtual void UpdatePlatformContextMenu(ui::MenuModel* menu); 33 34 private: 35 // Getter for item_ that allows lazy initialization. 36 NSStatusItem* item(); 37 scoped_nsobject<NSStatusItem> item_; 38 39 scoped_nsobject<StatusItemController> controller_; 40 41 DISALLOW_COPY_AND_ASSIGN(StatusIconMac); 42 }; 43 44 45 #endif // CHROME_BROWSER_UI_COCOA_STATUS_ICONS_STATUS_ICON_MAC_H_ 46