Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: chrome/browser/cocoa/status_icons/status_icon_mac.h

Issue 661454: Initial implementation of status tray functionality (mac-only, currently). (Closed)
Patch Set: more changes per review feedback Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 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_COCOA_STATUS_ICONS_STATUS_ICON_MAC_H_
6 #define CHROME_BROWSER_COCOA_STATUS_ICONS_STATUS_ICON_MAC_H_
7
8 #include <vector>
9
10 #import <Cocoa/Cocoa.h>
11
12 #include "base/scoped_nsobject.h"
13 #include "base/string16.h"
14 #include "chrome/browser/status_icons/status_icon.h"
15
16 class SkBitmap;
17 @class NSStatusItem;
18 @class StatusItemController;
19
20 class StatusIconMac : public StatusIcon {
21 public:
22 StatusIconMac();
23 virtual ~StatusIconMac();
24
25 // Sets the image associated with this status icon.
26 virtual void SetImage(const SkBitmap& image);
27
28 // Sets the hover text for this status icon.
29 virtual void SetToolTip(const string16& tool_tip);
30
31 // Adds/removes a observer for status bar events.
32 virtual void AddObserver(StatusIcon::StatusIconObserver* observer);
33 virtual void RemoveObserver(StatusIcon::StatusIconObserver* observer);
34
35 // Called back if the user clicks on the status bar icon.
36 void HandleClick();
37
38 private:
39 // Getter for item_ that allows lazy initialization.
40 NSStatusItem* item();
41 scoped_nsobject<NSStatusItem> item_;
42
43 scoped_nsobject<StatusItemController> controller_;
44 std::vector<StatusIcon::StatusIconObserver*> observers_;
45 };
46
47
48 #endif // CHROME_BROWSER_COCOA_STATUS_ICONS_STATUS_ICON_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/cocoa/status_icons/status_icon_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698