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/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell/panel_window.h" | 8 #include "ash/shell/panel_window.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/system/audio/tray_volume.h" | 10 #include "ash/system/audio/tray_volume.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 } | 254 } |
255 | 255 |
256 void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { | 256 void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
257 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); | 257 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); |
258 it != items_.end(); | 258 it != items_.end(); |
259 ++it) { | 259 ++it) { |
260 (*it)->UpdateAfterShelfAlignmentChange(alignment); | 260 (*it)->UpdateAfterShelfAlignmentChange(alignment); |
261 } | 261 } |
262 } | 262 } |
263 | 263 |
| 264 void SystemTray::UpdateAfterAshInit() { |
| 265 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); |
| 266 it != items_.end(); |
| 267 ++it) { |
| 268 (*it)->UpdateAfterAshInit(); |
| 269 } |
| 270 } |
| 271 |
264 void SystemTray::SetHideNotifications(bool hide_notifications) { | 272 void SystemTray::SetHideNotifications(bool hide_notifications) { |
265 if (notification_bubble_.get()) | 273 if (notification_bubble_.get()) |
266 notification_bubble_->SetVisible(!hide_notifications); | 274 notification_bubble_->SetVisible(!hide_notifications); |
267 hide_notifications_ = hide_notifications; | 275 hide_notifications_ = hide_notifications; |
268 } | 276 } |
269 | 277 |
270 bool SystemTray::IsAnyBubbleVisible() const { | 278 bool SystemTray::IsAnyBubbleVisible() const { |
271 if (bubble_.get() && bubble_->IsVisible()) | 279 if (bubble_.get() && bubble_->IsVisible()) |
272 return true; | 280 return true; |
273 if (notification_bubble_.get() && notification_bubble_->IsVisible()) | 281 if (notification_bubble_.get() && notification_bubble_->IsVisible()) |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 511 |
504 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) { | 512 void SystemTray::OnPaintFocusBorder(gfx::Canvas* canvas) { |
505 // The tray itself expands to the right and bottom edge of the screen to make | 513 // The tray itself expands to the right and bottom edge of the screen to make |
506 // sure clicking on the edges brings up the popup. However, the focus border | 514 // sure clicking on the edges brings up the popup. However, the focus border |
507 // should be only around the container. | 515 // should be only around the container. |
508 if (GetWidget() && GetWidget()->IsActive()) | 516 if (GetWidget() && GetWidget()->IsActive()) |
509 DrawBorder(canvas, GetContentsBounds()); | 517 DrawBorder(canvas, GetContentsBounds()); |
510 } | 518 } |
511 | 519 |
512 } // namespace ash | 520 } // namespace ash |
OLD | NEW |