| 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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell/panel_window.h" | 10 #include "ash/shell/panel_window.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void SystemTray::UpdateAfterLoginStatusChange(user::LoginStatus login_status) { | 278 void SystemTray::UpdateAfterLoginStatusChange(user::LoginStatus login_status) { |
| 279 DestroySystemBubble(); | 279 DestroySystemBubble(); |
| 280 UpdateNotificationBubble(); | 280 UpdateNotificationBubble(); |
| 281 | 281 |
| 282 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); | 282 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); |
| 283 it != items_.end(); | 283 it != items_.end(); |
| 284 ++it) { | 284 ++it) { |
| 285 (*it)->UpdateAfterLoginStatusChange(login_status); | 285 (*it)->UpdateAfterLoginStatusChange(login_status); |
| 286 } | 286 } |
| 287 | 287 |
| 288 // Items default to SHELF_ALIGNMENT_BOTTOM. Update them if the initial |
| 289 // position of the shelf differs. |
| 290 if (shelf_alignment() != SHELF_ALIGNMENT_BOTTOM) |
| 291 UpdateAfterShelfAlignmentChange(shelf_alignment()); |
| 292 |
| 288 SetVisible(true); | 293 SetVisible(true); |
| 289 PreferredSizeChanged(); | 294 PreferredSizeChanged(); |
| 290 } | 295 } |
| 291 | 296 |
| 292 void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { | 297 void SystemTray::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
| 293 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); | 298 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); |
| 294 it != items_.end(); | 299 it != items_.end(); |
| 295 ++it) { | 300 ++it) { |
| 296 (*it)->UpdateAfterShelfAlignmentChange(alignment); | 301 (*it)->UpdateAfterShelfAlignmentChange(alignment); |
| 297 } | 302 } |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 ConvertPointToWidget(this, &point); | 612 ConvertPointToWidget(this, &point); |
| 608 arrow_offset = point.x(); | 613 arrow_offset = point.x(); |
| 609 } | 614 } |
| 610 } | 615 } |
| 611 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); | 616 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); |
| 612 } | 617 } |
| 613 return true; | 618 return true; |
| 614 } | 619 } |
| 615 | 620 |
| 616 } // namespace ash | 621 } // namespace ash |
| OLD | NEW |