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

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

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_item.h ('k') | ash/system/tray/system_tray_unittest.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.cc
diff --git a/ash/system/tray/system_tray_item.cc b/ash/system/tray/system_tray_item.cc
index 44ee5da41eaf646fdd0c13a08667d9d5f06d76ef..50f0e2f000ca2831fc7e46d89dd80b2015cfe7fe 100644
--- a/ash/system/tray/system_tray_item.cc
+++ b/ash/system/tray/system_tray_item.cc
@@ -4,16 +4,13 @@
#include "ash/system/tray/system_tray_item.h"
-#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/tray_constants.h"
-#include "ash/system/tray/tray_item_view.h"
-#include "ui/views/controls/label.h"
#include "ui/views/view.h"
namespace ash {
-SystemTrayItem::SystemTrayItem() {
+SystemTrayItem::SystemTrayItem(SystemTray* system_tray)
+ : system_tray_(system_tray) {
}
SystemTrayItem::~SystemTrayItem() {
@@ -48,8 +45,7 @@ void SystemTrayItem::DestroyNotificationView() {
}
void SystemTrayItem::TransitionDetailedView() {
- Shell::GetInstance()->system_tray()->ShowDetailedView(this, 0, true,
- BUBBLE_USE_EXISTING);
+ system_tray()->ShowDetailedView(this, 0, true, BUBBLE_USE_EXISTING);
}
void SystemTrayItem::UpdateAfterLoginStatusChange(user::LoginStatus status) {
@@ -59,24 +55,24 @@ void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
}
void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) {
- Shell::GetInstance()->system_tray()->ShowDetailedView(
+ system_tray()->ShowDetailedView(
this, for_seconds, activate, BUBBLE_CREATE_NEW);
}
void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) {
- Shell::GetInstance()->system_tray()->SetDetailedViewCloseDelay(for_seconds);
+ system_tray()->SetDetailedViewCloseDelay(for_seconds);
}
void SystemTrayItem::HideDetailedView() {
- Shell::GetInstance()->system_tray()->HideDetailedView(this);
+ system_tray()->HideDetailedView(this);
}
void SystemTrayItem::ShowNotificationView() {
- Shell::GetInstance()->system_tray()->ShowNotificationView(this);
+ system_tray()->ShowNotificationView(this);
}
void SystemTrayItem::HideNotificationView() {
- Shell::GetInstance()->system_tray()->HideNotificationView(this);
+ system_tray()->HideNotificationView(this);
}
bool SystemTrayItem::ShouldShowLauncher() const {
« no previous file with comments | « ash/system/tray/system_tray_item.h ('k') | ash/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698