OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/system/tray_update.h" | 5 #include "ash/system/tray_update.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 else if (!timer_.IsRunning()) | 143 else if (!timer_.IsRunning()) |
144 RestartTimer(); | 144 RestartTimer(); |
145 } | 145 } |
146 | 146 |
147 void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) override {} | 147 void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) override {} |
148 | 148 |
149 void OnLayerAnimationScheduled( | 149 void OnLayerAnimationScheduled( |
150 ui::LayerAnimationSequence* sequence) override {} | 150 ui::LayerAnimationSequence* sequence) override {} |
151 | 151 |
152 SystemTrayItem* owner_; | 152 SystemTrayItem* owner_; |
153 base::OneShotTimer<UpdateNagger> timer_; | 153 base::OneShotTimer timer_; |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(UpdateNagger); | 155 DISALLOW_COPY_AND_ASSIGN(UpdateNagger); |
156 }; | 156 }; |
157 | 157 |
158 } // namespace tray | 158 } // namespace tray |
159 | 159 |
160 TrayUpdate::TrayUpdate(SystemTray* system_tray) | 160 TrayUpdate::TrayUpdate(SystemTray* system_tray) |
161 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_UPDATE) { | 161 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_UPDATE) { |
162 Shell::GetInstance()->system_tray_notifier()->AddUpdateObserver(this); | 162 Shell::GetInstance()->system_tray_notifier()->AddUpdateObserver(this); |
163 } | 163 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 SetImageFromResourceId(DecideResource(info.severity, false)); | 196 SetImageFromResourceId(DecideResource(info.severity, false)); |
197 tray_view()->SetVisible(true); | 197 tray_view()->SetVisible(true); |
198 if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() && | 198 if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() && |
199 !nagger_.get()) { | 199 !nagger_.get()) { |
200 // The shelf is not visible, and there is no nagger scheduled. | 200 // The shelf is not visible, and there is no nagger scheduled. |
201 nagger_.reset(new tray::UpdateNagger(this)); | 201 nagger_.reset(new tray::UpdateNagger(this)); |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 } // namespace ash | 205 } // namespace ash |
OLD | NEW |