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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 tray_cast_(nullptr), | 212 tray_cast_(nullptr), |
213 tray_date_(nullptr), | 213 tray_date_(nullptr), |
214 tray_network_(nullptr), | 214 tray_network_(nullptr), |
215 tray_tiles_(nullptr), | 215 tray_tiles_(nullptr), |
216 tray_system_info_(nullptr), | 216 tray_system_info_(nullptr), |
217 tray_update_(nullptr), | 217 tray_update_(nullptr), |
218 screen_capture_tray_item_(nullptr), | 218 screen_capture_tray_item_(nullptr), |
219 screen_share_tray_item_(nullptr) { | 219 screen_share_tray_item_(nullptr) { |
220 if (MaterialDesignController::IsShelfMaterial()) { | 220 if (MaterialDesignController::IsShelfMaterial()) { |
221 SetInkDropMode(InkDropMode::ON); | 221 SetInkDropMode(InkDropMode::ON); |
222 SetContentsBackground(false); | |
223 | 222 |
224 // Since user avatar is on the right hand side of System tray of a | 223 // Since user avatar is on the right hand side of System tray of a |
225 // horizontal shelf and that is sufficient to indicate separation, no | 224 // horizontal shelf and that is sufficient to indicate separation, no |
226 // separator is required. | 225 // separator is required. |
227 set_separator_visibility(false); | 226 set_separator_visibility(false); |
228 } else { | |
229 SetContentsBackground(true); | |
230 } | 227 } |
| 228 SetContentsBackground(); |
231 } | 229 } |
232 | 230 |
233 SystemTray::~SystemTray() { | 231 SystemTray::~SystemTray() { |
234 // Destroy any child views that might have back pointers before ~View(). | 232 // Destroy any child views that might have back pointers before ~View(). |
235 activation_observer_.reset(); | 233 activation_observer_.reset(); |
236 key_event_watcher_.reset(); | 234 key_event_watcher_.reset(); |
237 system_bubble_.reset(); | 235 system_bubble_.reset(); |
238 notification_bubble_.reset(); | 236 notification_bubble_.reset(); |
239 for (const auto& item : items_) | 237 for (const auto& item : items_) |
240 item->DestroyTrayView(); | 238 item->DestroyTrayView(); |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 .work_area() | 886 .work_area() |
889 .height(); | 887 .height(); |
890 if (work_area_height > 0) { | 888 if (work_area_height > 0) { |
891 UMA_HISTOGRAM_CUSTOM_COUNTS( | 889 UMA_HISTOGRAM_CUSTOM_COUNTS( |
892 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 890 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
893 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 891 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
894 } | 892 } |
895 } | 893 } |
896 | 894 |
897 } // namespace ash | 895 } // namespace ash |
OLD | NEW |