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

Unified Diff: chrome/browser/status_icons/status_icon.h

Issue 661454: Initial implementation of status tray functionality (mac-only, currently). (Closed)
Patch Set: more changes per review feedback Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/status_icons/status_icon.h
diff --git a/chrome/browser/status_icons/status_icon.h b/chrome/browser/status_icons/status_icon.h
new file mode 100644
index 0000000000000000000000000000000000000000..aeefdfe6e0d6fac1eac844d6502b3063b5726dd7
--- /dev/null
+++ b/chrome/browser/status_icons/status_icon.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_H_
+#define CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_H_
+
+#include "base/string16.h"
+
+class SkBitmap;
+
+class StatusIcon {
+ public:
+ // Creates a new StatusIcon.
+ static StatusIcon* Create();
+
+ virtual ~StatusIcon() {}
+
+ // Sets the image associated with this status icon.
+ virtual void SetImage(const SkBitmap& image) = 0;
+
+ // Sets the hover text for this status icon.
+ virtual void SetToolTip(const string16& tool_tip) = 0;
+
+ class StatusIconObserver {
+ public:
+ virtual ~StatusIconObserver() {}
+
+ // Called when the user clicks on the system tray icon.
+ virtual void OnClicked() = 0;
+ };
+
+ // Adds/removes a observer for status bar events.
+ virtual void AddObserver(StatusIcon::StatusIconObserver* observer) = 0;
+ virtual void RemoveObserver(StatusIcon::StatusIconObserver* observer) = 0;
+};
+
+
+#endif // CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_H_
« no previous file with comments | « chrome/browser/cocoa/status_icons/status_icon_mac_unittest.mm ('k') | chrome/browser/status_icons/status_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698