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

Unified Diff: ash/system/tray/tray_item_view.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/tray_item_more.cc ('k') | ash/system/tray/tray_item_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_item_view.h
diff --git a/ash/system/tray/tray_item_view.h b/ash/system/tray/tray_item_view.h
index f839cc8aeb1b6047249063c1efb0854674d115fd..00c5297648f8a7d59bf877428d85e9b660ad732e 100644
--- a/ash/system/tray/tray_item_view.h
+++ b/ash/system/tray/tray_item_view.h
@@ -18,6 +18,9 @@ class Label;
}
namespace ash {
+
+class SystemTrayItem;
+
namespace internal {
// Base-class for items in the tray. It makes sure the widget is updated
@@ -26,15 +29,16 @@ namespace internal {
class TrayItemView : public views::View,
public ui::AnimationDelegate {
public:
- TrayItemView();
+ explicit TrayItemView(SystemTrayItem* owner);
virtual ~TrayItemView();
// Convenience function for creating a child Label or ImageView.
void CreateLabel();
void CreateImageView();
- views::Label* label() { return label_; }
- views::ImageView* image_view() { return image_view_; }
+ SystemTrayItem* owner() const { return owner_; }
+ views::Label* label() const { return label_; }
+ views::ImageView* image_view() const { return image_view_; }
// Overridden from views::View.
virtual void SetVisible(bool visible) OVERRIDE;
@@ -63,6 +67,7 @@ class TrayItemView : public views::View,
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE;
+ SystemTrayItem* owner_;
scoped_ptr<ui::SlideAnimation> animation_;
views::Label* label_;
views::ImageView* image_view_;
« no previous file with comments | « ash/system/tray/tray_item_more.cc ('k') | ash/system/tray/tray_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698