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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 : TrayBackgroundView(wm_shelf), | 209 : TrayBackgroundView(wm_shelf), |
210 web_notification_tray_(nullptr), | 210 web_notification_tray_(nullptr), |
211 detailed_item_(nullptr), | 211 detailed_item_(nullptr), |
212 default_bubble_height_(0), | 212 default_bubble_height_(0), |
213 hide_notifications_(false), | 213 hide_notifications_(false), |
214 full_system_tray_menu_(false), | 214 full_system_tray_menu_(false), |
215 tray_accessibility_(nullptr), | 215 tray_accessibility_(nullptr), |
216 tray_audio_(nullptr), | 216 tray_audio_(nullptr), |
217 tray_cast_(nullptr), | 217 tray_cast_(nullptr), |
218 tray_date_(nullptr), | 218 tray_date_(nullptr), |
| 219 tray_network_(nullptr), |
219 tray_tiles_(nullptr), | 220 tray_tiles_(nullptr), |
220 tray_system_info_(nullptr), | 221 tray_system_info_(nullptr), |
221 tray_update_(nullptr), | 222 tray_update_(nullptr), |
222 screen_capture_tray_item_(nullptr), | 223 screen_capture_tray_item_(nullptr), |
223 screen_share_tray_item_(nullptr) { | 224 screen_share_tray_item_(nullptr) { |
224 if (MaterialDesignController::IsShelfMaterial()) { | 225 if (MaterialDesignController::IsShelfMaterial()) { |
225 SetInkDropMode(InkDropMode::ON); | 226 SetInkDropMode(InkDropMode::ON); |
226 SetContentsBackground(false); | 227 SetContentsBackground(false); |
227 } else { | 228 } else { |
228 SetContentsBackground(true); | 229 SetContentsBackground(true); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 tray_update_ = new TrayUpdate(this); | 284 tray_update_ = new TrayUpdate(this); |
284 | 285 |
285 #if defined(OS_CHROMEOS) | 286 #if defined(OS_CHROMEOS) |
286 AddTrayItem(new TraySessionLengthLimit(this)); | 287 AddTrayItem(new TraySessionLengthLimit(this)); |
287 AddTrayItem(new TrayEnterprise(this)); | 288 AddTrayItem(new TrayEnterprise(this)); |
288 AddTrayItem(new TraySupervisedUser(this)); | 289 AddTrayItem(new TraySupervisedUser(this)); |
289 AddTrayItem(new TrayIME(this)); | 290 AddTrayItem(new TrayIME(this)); |
290 AddTrayItem(tray_accessibility_); | 291 AddTrayItem(tray_accessibility_); |
291 AddTrayItem(new TrayTracing(this)); | 292 AddTrayItem(new TrayTracing(this)); |
292 AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get())); | 293 AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get())); |
293 AddTrayItem(new TrayNetwork(this)); | 294 tray_network_ = new TrayNetwork(this); |
| 295 AddTrayItem(tray_network_); |
294 AddTrayItem(new TrayVPN(this)); | 296 AddTrayItem(new TrayVPN(this)); |
295 AddTrayItem(new TraySms(this)); | 297 AddTrayItem(new TraySms(this)); |
296 AddTrayItem(new TrayBluetooth(this)); | 298 AddTrayItem(new TrayBluetooth(this)); |
297 tray_cast_ = new TrayCast(this); | 299 tray_cast_ = new TrayCast(this); |
298 AddTrayItem(tray_cast_); | 300 AddTrayItem(tray_cast_); |
299 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); | 301 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); |
300 AddTrayItem(screen_capture_tray_item_); | 302 AddTrayItem(screen_capture_tray_item_); |
301 screen_share_tray_item_ = new ScreenShareTrayItem(this); | 303 screen_share_tray_item_ = new ScreenShareTrayItem(this); |
302 AddTrayItem(screen_share_tray_item_); | 304 AddTrayItem(screen_share_tray_item_); |
303 AddTrayItem(new MultiProfileMediaTrayItem(this)); | 305 AddTrayItem(new MultiProfileMediaTrayItem(this)); |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 } | 803 } |
802 | 804 |
803 TrayCast* SystemTray::GetTrayCastForTesting() const { | 805 TrayCast* SystemTray::GetTrayCastForTesting() const { |
804 return tray_cast_; | 806 return tray_cast_; |
805 } | 807 } |
806 | 808 |
807 TrayDate* SystemTray::GetTrayDateForTesting() const { | 809 TrayDate* SystemTray::GetTrayDateForTesting() const { |
808 return tray_date_; | 810 return tray_date_; |
809 } | 811 } |
810 | 812 |
| 813 TrayNetwork* SystemTray::GetTrayNetworkForTesting() const { |
| 814 return tray_network_; |
| 815 } |
| 816 |
811 TraySystemInfo* SystemTray::GetTraySystemInfoForTesting() const { | 817 TraySystemInfo* SystemTray::GetTraySystemInfoForTesting() const { |
812 return tray_system_info_; | 818 return tray_system_info_; |
813 } | 819 } |
814 | 820 |
815 TrayTiles* SystemTray::GetTrayTilesForTesting() const { | 821 TrayTiles* SystemTray::GetTrayTilesForTesting() const { |
816 return tray_tiles_; | 822 return tray_tiles_; |
817 } | 823 } |
818 | 824 |
819 TrayUpdate* SystemTray::GetTrayUpdateForTesting() const { | 825 TrayUpdate* SystemTray::GetTrayUpdateForTesting() const { |
820 return tray_update_; | 826 return tray_update_; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 .work_area() | 915 .work_area() |
910 .height(); | 916 .height(); |
911 if (work_area_height > 0) { | 917 if (work_area_height > 0) { |
912 UMA_HISTOGRAM_CUSTOM_COUNTS( | 918 UMA_HISTOGRAM_CUSTOM_COUNTS( |
913 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 919 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
914 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 920 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
915 } | 921 } |
916 } | 922 } |
917 | 923 |
918 } // namespace ash | 924 } // namespace ash |
OLD | NEW |