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

Unified Diff: ash/system/tray/system_tray_item.h

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. Created 8 years, 1 month 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
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_item.h
diff --git a/ash/system/tray/system_tray_item.h b/ash/system/tray/system_tray_item.h
index 6361529f8448798a6063310228fa3a620f136eb6..72c1aea15e8c635cf4e3503604e92a32507d6a76 100644
--- a/ash/system/tray/system_tray_item.h
+++ b/ash/system/tray/system_tray_item.h
@@ -17,13 +17,15 @@ class View;
namespace ash {
+class SystemTray;
+
namespace internal {
class TrayItemView;
}
class ASH_EXPORT SystemTrayItem {
public:
- SystemTrayItem();
+ explicit SystemTrayItem(SystemTray* system_tray);
virtual ~SystemTrayItem();
// Create* functions may return NULL if nothing should be displayed for the
@@ -100,7 +102,12 @@ class ASH_EXPORT SystemTrayItem {
// the launcher is in the auto-hide state. Default is true.
virtual bool ShouldShowLauncher() const;
+ // Returns the system tray that this item belongs to.
+ SystemTray* system_tray() const { return system_tray_; }
+
private:
+ SystemTray* system_tray_;
+
DISALLOW_COPY_AND_ASSIGN(SystemTrayItem);
};
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698