| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 full_system_tray_menu_ = items.size() > 1; | 489 full_system_tray_menu_ = items.size() > 1; |
| 490 | 490 |
| 491 TrayBubbleView::InitParams init_params( | 491 TrayBubbleView::InitParams init_params( |
| 492 GetAnchorAlignment(), kTrayMenuMinimumWidth, kTrayPopupMaxWidth); | 492 GetAnchorAlignment(), kTrayMenuMinimumWidth, kTrayPopupMaxWidth); |
| 493 // TODO(oshima): Change TrayBubbleView itself. | 493 // TODO(oshima): Change TrayBubbleView itself. |
| 494 init_params.can_activate = false; | 494 init_params.can_activate = false; |
| 495 if (detailed) { | 495 if (detailed) { |
| 496 // This is the case where a volume control or brightness control bubble | 496 // This is the case where a volume control or brightness control bubble |
| 497 // is created. | 497 // is created. |
| 498 init_params.max_height = default_bubble_height_; | 498 init_params.max_height = default_bubble_height_; |
| 499 init_params.bg_color = kBackgroundColor; | |
| 500 } else { | 499 } else { |
| 501 init_params.bg_color = kHeaderBackgroundColor; | 500 init_params.bg_color = kHeaderBackgroundColor; |
| 502 } | 501 } |
| 503 if (bubble_type == SystemTrayBubble::BUBBLE_TYPE_DEFAULT) | 502 if (bubble_type == SystemTrayBubble::BUBBLE_TYPE_DEFAULT) |
| 504 init_params.close_on_deactivate = !persistent; | 503 init_params.close_on_deactivate = !persistent; |
| 505 SystemTrayBubble* bubble = new SystemTrayBubble(this, items, bubble_type); | 504 SystemTrayBubble* bubble = new SystemTrayBubble(this, items, bubble_type); |
| 506 | 505 |
| 507 system_bubble_.reset(new SystemBubbleWrapper(bubble)); | 506 system_bubble_.reset(new SystemBubbleWrapper(bubble)); |
| 508 system_bubble_->InitView(this, GetBubbleAnchor(), GetBubbleAnchorInsets(), | 507 system_bubble_->InitView(this, GetBubbleAnchor(), GetBubbleAnchorInsets(), |
| 509 &init_params, persistent); | 508 &init_params, persistent); |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 .work_area() | 742 .work_area() |
| 744 .height(); | 743 .height(); |
| 745 if (work_area_height > 0) { | 744 if (work_area_height > 0) { |
| 746 UMA_HISTOGRAM_CUSTOM_COUNTS( | 745 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 747 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 746 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 748 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 747 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 749 } | 748 } |
| 750 } | 749 } |
| 751 | 750 |
| 752 } // namespace ash | 751 } // namespace ash |
| OLD | NEW |