| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 | 574 |
| 575 void SystemTray::OnMouseExitedView() { | 575 void SystemTray::OnMouseExitedView() { |
| 576 if (system_bubble_) | 576 if (system_bubble_) |
| 577 system_bubble_->bubble()->RestartAutoCloseTimer(); | 577 system_bubble_->bubble()->RestartAutoCloseTimer(); |
| 578 } | 578 } |
| 579 | 579 |
| 580 base::string16 SystemTray::GetAccessibleNameForBubble() { | 580 base::string16 SystemTray::GetAccessibleNameForBubble() { |
| 581 return GetAccessibleNameForTray(); | 581 return GetAccessibleNameForTray(); |
| 582 } | 582 } |
| 583 | 583 |
| 584 void SystemTray::OnBeforeBubbleWidgetInit( | |
| 585 views::Widget* anchor_widget, | |
| 586 views::Widget* bubble_widget, | |
| 587 views::Widget::InitParams* params) const { | |
| 588 // Place the bubble in the same root window as |anchor_widget|. | |
| 589 RootWindowController::ForWindow(anchor_widget->GetNativeWindow()) | |
| 590 ->ConfigureWidgetInitParamsForContainer( | |
| 591 bubble_widget, kShellWindowId_SettingBubbleContainer, params); | |
| 592 } | |
| 593 | |
| 594 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { | 584 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { |
| 595 HideBubbleWithView(bubble_view); | 585 HideBubbleWithView(bubble_view); |
| 596 } | 586 } |
| 597 | 587 |
| 598 TrayCast* SystemTray::GetTrayCastForTesting() const { | 588 TrayCast* SystemTray::GetTrayCastForTesting() const { |
| 599 return tray_cast_; | 589 return tray_cast_; |
| 600 } | 590 } |
| 601 | 591 |
| 602 TrayEnterprise* SystemTray::GetTrayEnterpriseForTesting() const { | 592 TrayEnterprise* SystemTray::GetTrayEnterpriseForTesting() const { |
| 603 return tray_enterprise_; | 593 return tray_enterprise_; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 .work_area() | 698 .work_area() |
| 709 .height(); | 699 .height(); |
| 710 if (work_area_height > 0) { | 700 if (work_area_height > 0) { |
| 711 UMA_HISTOGRAM_CUSTOM_COUNTS( | 701 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 712 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 702 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 713 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 703 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 714 } | 704 } |
| 715 } | 705 } |
| 716 | 706 |
| 717 } // namespace ash | 707 } // namespace ash |
| OLD | NEW |