Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: ash/common/system/tray/system_tray.cc

Issue 2555373004: Apply new MD shadows to CrOS tray bubbles. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/system/tray/system_tray.h" 5 #include "ash/common/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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 int menu_width = kTrayMenuMinimumWidthMd; 577 int menu_width = kTrayMenuMinimumWidthMd;
578 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) { 578 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) {
579 // The menu width is fixed, and it is a per language setting. 579 // The menu width is fixed, and it is a per language setting.
580 menu_width = std::max( 580 menu_width = std::max(
581 kTrayMenuMinimumWidth, 581 kTrayMenuMinimumWidth,
582 WmShell::Get()->system_tray_delegate()->GetSystemTrayMenuWidth()); 582 WmShell::Get()->system_tray_delegate()->GetSystemTrayMenuWidth());
583 } 583 }
584 584
585 TrayBubbleView::InitParams init_params(GetAnchorAlignment(), menu_width, 585 TrayBubbleView::InitParams init_params(GetAnchorAlignment(), menu_width,
586 kTrayPopupMaxWidth); 586 kTrayPopupMaxWidth);
587 // TODO(oshima): Change TrayBubbleView itself.
588 init_params.can_activate = false;
589 if (detailed) { 587 if (detailed) {
590 // This is the case where a volume control or brightness control bubble 588 // This is the case where a volume control or brightness control bubble
591 // is created. 589 // is created.
592 init_params.max_height = default_bubble_height_; 590 init_params.max_height = default_bubble_height_;
593 init_params.bg_color = kBackgroundColor; 591 init_params.bg_color = kBackgroundColor;
594 } else { 592 } else {
595 init_params.bg_color = kHeaderBackgroundColor; 593 init_params.bg_color = kHeaderBackgroundColor;
596 } 594 }
597 if (bubble_type == SystemTrayBubble::BUBBLE_TYPE_DEFAULT) 595 if (bubble_type == SystemTrayBubble::BUBBLE_TYPE_DEFAULT)
598 init_params.close_on_deactivate = !persistent; 596 init_params.close_on_deactivate = !persistent;
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 .work_area() 907 .work_area()
910 .height(); 908 .height();
911 if (work_area_height > 0) { 909 if (work_area_height > 0) {
912 UMA_HISTOGRAM_CUSTOM_COUNTS( 910 UMA_HISTOGRAM_CUSTOM_COUNTS(
913 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 911 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
914 100 * bubble_view->height() / work_area_height, 1, 300, 100); 912 100 * bubble_view->height() / work_area_height, 1, 300, 100);
915 } 913 }
916 } 914 }
917 915
918 } // namespace ash 916 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698