| 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/common/system/tray/system_tray.h" | 5 #include "ash/common/system/tray/system_tray.h" |
| 6 | 6 |
| 7 #include "ash/common/key_event_watcher.h" | 7 #include "ash/common/key_event_watcher.h" |
| 8 #include "ash/common/login_status.h" | 8 #include "ash/common/login_status.h" |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 hide_notifications_(false), | 175 hide_notifications_(false), |
| 176 full_system_tray_menu_(false), | 176 full_system_tray_menu_(false), |
| 177 tray_accessibility_(nullptr), | 177 tray_accessibility_(nullptr), |
| 178 tray_audio_(nullptr), | 178 tray_audio_(nullptr), |
| 179 tray_cast_(nullptr), | 179 tray_cast_(nullptr), |
| 180 tray_date_(nullptr), | 180 tray_date_(nullptr), |
| 181 tray_update_(nullptr), | 181 tray_update_(nullptr), |
| 182 screen_capture_tray_item_(nullptr), | 182 screen_capture_tray_item_(nullptr), |
| 183 screen_share_tray_item_(nullptr) { | 183 screen_share_tray_item_(nullptr) { |
| 184 SetContentsBackground(); | 184 SetContentsBackground(); |
| 185 if (MaterialDesignController::IsSystemTrayMenuMaterial()) |
| 186 tray_container()->SetMargin(GetTrayConstant(TRAY_IMAGE_ITEM_PADDING), 0); |
| 185 } | 187 } |
| 186 | 188 |
| 187 SystemTray::~SystemTray() { | 189 SystemTray::~SystemTray() { |
| 188 // Destroy any child views that might have back pointers before ~View(). | 190 // Destroy any child views that might have back pointers before ~View(). |
| 189 activation_observer_.reset(); | 191 activation_observer_.reset(); |
| 190 key_event_watcher_.reset(); | 192 key_event_watcher_.reset(); |
| 191 system_bubble_.reset(); | 193 system_bubble_.reset(); |
| 192 notification_bubble_.reset(); | 194 notification_bubble_.reset(); |
| 193 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); | 195 for (std::vector<SystemTrayItem*>::iterator it = items_.begin(); |
| 194 it != items_.end(); ++it) { | 196 it != items_.end(); ++it) { |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 .work_area() | 891 .work_area() |
| 890 .height(); | 892 .height(); |
| 891 if (work_area_height > 0) { | 893 if (work_area_height > 0) { |
| 892 UMA_HISTOGRAM_CUSTOM_COUNTS( | 894 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 893 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 895 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 894 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 896 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 895 } | 897 } |
| 896 } | 898 } |
| 897 | 899 |
| 898 } // namespace ash | 900 } // namespace ash |
| OLD | NEW |