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

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

Issue 2780743002: Remove pre-MD code from TrayDetailsView. (Closed)
Patch Set: relative Created 3 years, 8 months 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 DestroySystemBubble(); 486 DestroySystemBubble();
487 487
488 // Remember if the menu is a single property (like e.g. volume) or the 488 // Remember if the menu is a single property (like e.g. volume) or the
489 // full tray menu. Note that in case of the |BUBBLE_USE_EXISTING| case 489 // full tray menu. Note that in case of the |BUBBLE_USE_EXISTING| case
490 // above, |full_system_tray_menu_| does not get changed since the fact that 490 // above, |full_system_tray_menu_| does not get changed since the fact that
491 // the menu is full (or not) doesn't change even if a "single property" 491 // the menu is full (or not) doesn't change even if a "single property"
492 // (like network) replaces most of the menu. 492 // (like network) replaces most of the menu.
493 full_system_tray_menu_ = items.size() > 1; 493 full_system_tray_menu_ = items.size() > 1;
494 494
495 TrayBubbleView::InitParams init_params( 495 TrayBubbleView::InitParams init_params(
496 GetAnchorAlignment(), kTrayMenuMinimumWidthMd, kTrayPopupMaxWidth); 496 GetAnchorAlignment(), kTrayMenuMinimumWidth, kTrayPopupMaxWidth);
497 // TODO(oshima): Change TrayBubbleView itself. 497 // TODO(oshima): Change TrayBubbleView itself.
498 init_params.can_activate = false; 498 init_params.can_activate = false;
499 if (detailed) { 499 if (detailed) {
500 // This is the case where a volume control or brightness control bubble 500 // This is the case where a volume control or brightness control bubble
501 // is created. 501 // is created.
502 init_params.max_height = default_bubble_height_; 502 init_params.max_height = default_bubble_height_;
503 init_params.bg_color = kBackgroundColor; 503 init_params.bg_color = kBackgroundColor;
504 } else { 504 } else {
505 init_params.bg_color = kHeaderBackgroundColor; 505 init_params.bg_color = kHeaderBackgroundColor;
506 } 506 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 .work_area() 749 .work_area()
750 .height(); 750 .height();
751 if (work_area_height > 0) { 751 if (work_area_height > 0) {
752 UMA_HISTOGRAM_CUSTOM_COUNTS( 752 UMA_HISTOGRAM_CUSTOM_COUNTS(
753 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 753 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
754 100 * bubble_view->height() / work_area_height, 1, 300, 100); 754 100 * bubble_view->height() / work_area_height, 1, 300, 100);
755 } 755 }
756 } 756 }
757 757
758 } // namespace ash 758 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698