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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 private: | 195 private: |
196 SystemTray* tray_; | 196 SystemTray* tray_; |
197 | 197 |
198 DISALLOW_COPY_AND_ASSIGN(ActivationObserver); | 198 DISALLOW_COPY_AND_ASSIGN(ActivationObserver); |
199 }; | 199 }; |
200 | 200 |
201 // SystemTray | 201 // SystemTray |
202 | 202 |
203 SystemTray::SystemTray(WmShelf* wm_shelf) | 203 SystemTray::SystemTray(WmShelf* wm_shelf) |
204 : TrayBackgroundView(wm_shelf), | 204 : TrayBackgroundView(wm_shelf, false), |
205 web_notification_tray_(nullptr), | 205 web_notification_tray_(nullptr), |
206 detailed_item_(nullptr), | 206 detailed_item_(nullptr), |
207 default_bubble_height_(0), | 207 default_bubble_height_(0), |
208 hide_notifications_(false), | 208 hide_notifications_(false), |
209 full_system_tray_menu_(false), | 209 full_system_tray_menu_(false), |
210 tray_accessibility_(nullptr), | 210 tray_accessibility_(nullptr), |
211 tray_audio_(nullptr), | 211 tray_audio_(nullptr), |
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 } |
231 } | 228 } |
232 | 229 |
233 SystemTray::~SystemTray() { | 230 SystemTray::~SystemTray() { |
234 // Destroy any child views that might have back pointers before ~View(). | 231 // Destroy any child views that might have back pointers before ~View(). |
235 activation_observer_.reset(); | 232 activation_observer_.reset(); |
236 key_event_watcher_.reset(); | 233 key_event_watcher_.reset(); |
237 system_bubble_.reset(); | 234 system_bubble_.reset(); |
238 notification_bubble_.reset(); | 235 notification_bubble_.reset(); |
239 for (const auto& item : items_) | 236 for (const auto& item : items_) |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 .work_area() | 885 .work_area() |
889 .height(); | 886 .height(); |
890 if (work_area_height > 0) { | 887 if (work_area_height > 0) { |
891 UMA_HISTOGRAM_CUSTOM_COUNTS( | 888 UMA_HISTOGRAM_CUSTOM_COUNTS( |
892 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 889 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
893 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 890 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
894 } | 891 } |
895 } | 892 } |
896 | 893 |
897 } // namespace ash | 894 } // namespace ash |
OLD | NEW |