| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 private: | 198 private: |
| 199 SystemTray* tray_; | 199 SystemTray* tray_; |
| 200 | 200 |
| 201 DISALLOW_COPY_AND_ASSIGN(ActivationObserver); | 201 DISALLOW_COPY_AND_ASSIGN(ActivationObserver); |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 // SystemTray | 204 // SystemTray |
| 205 | 205 |
| 206 SystemTray::SystemTray(WmShelf* wm_shelf) | 206 SystemTray::SystemTray(WmShelf* wm_shelf) |
| 207 : TrayBackgroundView(wm_shelf), | 207 : TrayBackgroundView(wm_shelf, true), |
| 208 web_notification_tray_(nullptr), | 208 web_notification_tray_(nullptr), |
| 209 detailed_item_(nullptr), | 209 detailed_item_(nullptr), |
| 210 default_bubble_height_(0), | 210 default_bubble_height_(0), |
| 211 full_system_tray_menu_(false), | 211 full_system_tray_menu_(false), |
| 212 tray_accessibility_(nullptr), | 212 tray_accessibility_(nullptr), |
| 213 tray_audio_(nullptr), | 213 tray_audio_(nullptr), |
| 214 tray_cast_(nullptr), | 214 tray_cast_(nullptr), |
| 215 tray_date_(nullptr), | 215 tray_date_(nullptr), |
| 216 tray_network_(nullptr), | 216 tray_network_(nullptr), |
| 217 tray_tiles_(nullptr), | 217 tray_tiles_(nullptr), |
| 218 tray_system_info_(nullptr), | 218 tray_system_info_(nullptr), |
| 219 tray_update_(nullptr), | 219 tray_update_(nullptr), |
| 220 screen_capture_tray_item_(nullptr), | 220 screen_capture_tray_item_(nullptr), |
| 221 screen_share_tray_item_(nullptr) { | 221 screen_share_tray_item_(nullptr) { |
| 222 if (MaterialDesignController::IsShelfMaterial()) { | 222 if (MaterialDesignController::IsShelfMaterial()) { |
| 223 SetInkDropMode(InkDropMode::ON); | 223 SetInkDropMode(InkDropMode::ON); |
| 224 SetContentsBackground(false); | |
| 225 | 224 |
| 226 // Since user avatar is on the right hand side of System tray of a | 225 // Since user avatar is on the right hand side of System tray of a |
| 227 // horizontal shelf and that is sufficient to indicate separation, no | 226 // horizontal shelf and that is sufficient to indicate separation, no |
| 228 // separator is required. | 227 // separator is required. |
| 229 set_separator_visibility(false); | 228 set_separator_visibility(false); |
| 230 } else { | |
| 231 SetContentsBackground(true); | |
| 232 } | 229 } |
| 233 } | 230 } |
| 234 | 231 |
| 235 SystemTray::~SystemTray() { | 232 SystemTray::~SystemTray() { |
| 236 // Destroy any child views that might have back pointers before ~View(). | 233 // Destroy any child views that might have back pointers before ~View(). |
| 237 activation_observer_.reset(); | 234 activation_observer_.reset(); |
| 238 key_event_watcher_.reset(); | 235 key_event_watcher_.reset(); |
| 239 system_bubble_.reset(); | 236 system_bubble_.reset(); |
| 240 for (const auto& item : items_) | 237 for (const auto& item : items_) |
| 241 item->DestroyTrayView(); | 238 item->DestroyTrayView(); |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 .work_area() | 771 .work_area() |
| 775 .height(); | 772 .height(); |
| 776 if (work_area_height > 0) { | 773 if (work_area_height > 0) { |
| 777 UMA_HISTOGRAM_CUSTOM_COUNTS( | 774 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 778 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 775 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 779 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 776 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 780 } | 777 } |
| 781 } | 778 } |
| 782 | 779 |
| 783 } // namespace ash | 780 } // namespace ash |
| OLD | NEW |