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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 | 532 |
533 void SystemTray::AnchorUpdated() { | 533 void SystemTray::AnchorUpdated() { |
534 if (notification_bubble_) { | 534 if (notification_bubble_) { |
535 notification_bubble_->bubble_view()->UpdateBubble(); | 535 notification_bubble_->bubble_view()->UpdateBubble(); |
536 // Ensure that the notification buble is above the launcher/status area. | 536 // Ensure that the notification buble is above the launcher/status area. |
537 notification_bubble_->bubble_view()->GetWidget()->StackAtTop(); | 537 notification_bubble_->bubble_view()->GetWidget()->StackAtTop(); |
538 UpdateBubbleViewArrow(notification_bubble_->bubble_view()); | 538 UpdateBubbleViewArrow(notification_bubble_->bubble_view()); |
539 } | 539 } |
540 if (system_bubble_) { | 540 if (system_bubble_) { |
541 system_bubble_->bubble_view()->UpdateBubble(); | 541 system_bubble_->bubble_view()->UpdateBubble(); |
542 if (!ash::switches::UseAlternateShelfLayout()) | 542 UpdateBubbleViewArrow(system_bubble_->bubble_view()); |
543 UpdateBubbleViewArrow(system_bubble_->bubble_view()); | |
544 } | 543 } |
545 } | 544 } |
546 | 545 |
547 base::string16 SystemTray::GetAccessibleNameForTray() { | 546 base::string16 SystemTray::GetAccessibleNameForTray() { |
548 return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); | 547 return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); |
549 } | 548 } |
550 | 549 |
551 void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) { | 550 void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) { |
552 if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) { | 551 if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) { |
553 DestroySystemBubble(); | 552 DestroySystemBubble(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 ConvertPointToWidget(this, &point); | 613 ConvertPointToWidget(this, &point); |
615 arrow_offset = point.x(); | 614 arrow_offset = point.x(); |
616 } | 615 } |
617 } | 616 } |
618 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); | 617 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); |
619 } | 618 } |
620 return true; | 619 return true; |
621 } | 620 } |
622 | 621 |
623 } // namespace ash | 622 } // namespace ash |
OLD | NEW |