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

Unified Diff: ash/system/tray_update.cc

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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
« no previous file with comments | « ash/system/tray/tray_background_view.cc ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray_update.cc
diff --git a/ash/system/tray_update.cc b/ash/system/tray_update.cc
index cc39e4757ef0f504ffc85e82937e7e09d079480a..7530a8b54ba46a619660cbe2cec75c3834f784be 100644
--- a/ash/system/tray_update.cc
+++ b/ash/system/tray_update.cc
@@ -4,6 +4,7 @@
#include "ash/system/tray_update.h"
+#include "ash/root_window_controller.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
@@ -125,7 +126,9 @@ class UpdateNagger : public ui::LayerAnimationObserver {
// Overridden from ui::LayerAnimationObserver.
virtual void OnLayerAnimationEnded(
ui::LayerAnimationSequence* sequence) OVERRIDE {
- if (Shell::GetInstance()->shelf()->IsVisible())
+ // TODO(oshima): Find out if the updator will be shown on non
+ // primary display.
+ if (Shell::GetPrimaryRootWindowController()->shelf()->IsVisible())
timer_.Stop();
else if (!timer_.IsRunning())
RestartTimer();
@@ -180,7 +183,8 @@ void TrayUpdate::OnUpdateRecommended(UpdateObserver::UpdateSeverity severity) {
severity_ = severity;
SetImageFromResourceId(DecideResource(severity_, false));
tray_view()->SetVisible(true);
- if (!Shell::GetInstance()->shelf()->IsVisible() && !nagger_.get()) {
+ if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() &&
+ !nagger_.get()) {
// The shelf is not visible, and there is no nagger scheduled.
nagger_.reset(new tray::UpdateNagger(this));
}
« no previous file with comments | « ash/system/tray/tray_background_view.cc ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698