Chromium Code Reviews| 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 |
| 11 #include "ash/common/key_event_watcher.h" | 11 #include "ash/common/key_event_watcher.h" |
| 12 #include "ash/common/login_status.h" | 12 #include "ash/common/login_status.h" |
| 13 #include "ash/common/material_design/material_design_controller.h" | 13 #include "ash/common/material_design/material_design_controller.h" |
| 14 #include "ash/common/session/session_state_delegate.h" | 14 #include "ash/common/session/session_state_delegate.h" |
| 15 #include "ash/common/shelf/wm_shelf.h" | 15 #include "ash/common/shelf/wm_shelf.h" |
| 16 #include "ash/common/shelf/wm_shelf_util.h" | 16 #include "ash/common/shelf/wm_shelf_util.h" |
| 17 #include "ash/common/system/chromeos/audio/tray_audio.h" | 17 #include "ash/common/system/chromeos/audio/tray_audio.h" |
| 18 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" | 18 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" |
| 19 #include "ash/common/system/chromeos/brightness/tray_brightness.h" | 19 #include "ash/common/system/chromeos/brightness/tray_brightness.h" |
| 20 #include "ash/common/system/chromeos/cast/tray_cast.h" | 20 #include "ash/common/system/chromeos/cast/tray_cast.h" |
| 21 #include "ash/common/system/chromeos/enterprise/tray_enterprise.h" | 21 #include "ash/common/system/chromeos/enterprise/tray_enterprise.h" |
| 22 #include "ash/common/system/chromeos/media_security/multi_profile_media_tray_ite m.h" | 22 #include "ash/common/system/chromeos/media_security/multi_profile_media_tray_ite m.h" |
| 23 #include "ash/common/system/chromeos/network/tray_network.h" | 23 #include "ash/common/system/chromeos/network/tray_network.h" |
| 24 #include "ash/common/system/chromeos/network/tray_sms.h" | |
| 25 #include "ash/common/system/chromeos/network/tray_vpn.h" | 24 #include "ash/common/system/chromeos/network/tray_vpn.h" |
| 26 #include "ash/common/system/chromeos/power/power_status.h" | 25 #include "ash/common/system/chromeos/power/power_status.h" |
| 27 #include "ash/common/system/chromeos/power/tray_power.h" | 26 #include "ash/common/system/chromeos/power/tray_power.h" |
| 28 #include "ash/common/system/chromeos/screen_security/screen_capture_tray_item.h" | 27 #include "ash/common/system/chromeos/screen_security/screen_capture_tray_item.h" |
| 29 #include "ash/common/system/chromeos/screen_security/screen_share_tray_item.h" | 28 #include "ash/common/system/chromeos/screen_security/screen_share_tray_item.h" |
| 30 #include "ash/common/system/chromeos/session/tray_session_length_limit.h" | 29 #include "ash/common/system/chromeos/session/tray_session_length_limit.h" |
| 31 #include "ash/common/system/chromeos/settings/tray_settings.h" | 30 #include "ash/common/system/chromeos/settings/tray_settings.h" |
| 32 #include "ash/common/system/chromeos/supervised/tray_supervised_user.h" | 31 #include "ash/common/system/chromeos/supervised/tray_supervised_user.h" |
| 33 #include "ash/common/system/chromeos/tray_caps_lock.h" | 32 #include "ash/common/system/chromeos/tray_caps_lock.h" |
| 34 #include "ash/common/system/chromeos/tray_tracing.h" | 33 #include "ash/common/system/chromeos/tray_tracing.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 AddTrayItem(base::MakeUnique<TrayEnterprise>(this)); | 284 AddTrayItem(base::MakeUnique<TrayEnterprise>(this)); |
| 286 AddTrayItem(base::MakeUnique<TraySupervisedUser>(this)); | 285 AddTrayItem(base::MakeUnique<TraySupervisedUser>(this)); |
| 287 AddTrayItem(base::MakeUnique<TrayIME>(this)); | 286 AddTrayItem(base::MakeUnique<TrayIME>(this)); |
| 288 AddTrayItem(base::WrapUnique(tray_accessibility_)); | 287 AddTrayItem(base::WrapUnique(tray_accessibility_)); |
| 289 AddTrayItem(base::MakeUnique<TrayTracing>(this)); | 288 AddTrayItem(base::MakeUnique<TrayTracing>(this)); |
| 290 AddTrayItem( | 289 AddTrayItem( |
| 291 base::MakeUnique<TrayPower>(this, message_center::MessageCenter::Get())); | 290 base::MakeUnique<TrayPower>(this, message_center::MessageCenter::Get())); |
| 292 tray_network_ = new TrayNetwork(this); | 291 tray_network_ = new TrayNetwork(this); |
| 293 AddTrayItem(base::WrapUnique(tray_network_)); | 292 AddTrayItem(base::WrapUnique(tray_network_)); |
| 294 AddTrayItem(base::MakeUnique<TrayVPN>(this)); | 293 AddTrayItem(base::MakeUnique<TrayVPN>(this)); |
| 295 AddTrayItem(base::MakeUnique<TraySms>(this)); | |
|
James Cook
2017/02/14 02:04:38
Hooray that this is going away!
yiyix
2017/02/15 19:41:39
:)
| |
| 296 AddTrayItem(base::MakeUnique<TrayBluetooth>(this)); | 294 AddTrayItem(base::MakeUnique<TrayBluetooth>(this)); |
| 297 tray_cast_ = new TrayCast(this); | 295 tray_cast_ = new TrayCast(this); |
| 298 AddTrayItem(base::WrapUnique(tray_cast_)); | 296 AddTrayItem(base::WrapUnique(tray_cast_)); |
| 299 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); | 297 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); |
| 300 AddTrayItem(base::WrapUnique(screen_capture_tray_item_)); | 298 AddTrayItem(base::WrapUnique(screen_capture_tray_item_)); |
| 301 screen_share_tray_item_ = new ScreenShareTrayItem(this); | 299 screen_share_tray_item_ = new ScreenShareTrayItem(this); |
| 302 AddTrayItem(base::WrapUnique(screen_share_tray_item_)); | 300 AddTrayItem(base::WrapUnique(screen_share_tray_item_)); |
| 303 AddTrayItem(base::MakeUnique<MultiProfileMediaTrayItem>(this)); | 301 AddTrayItem(base::MakeUnique<MultiProfileMediaTrayItem>(this)); |
| 304 tray_audio_ = new TrayAudio(this); | 302 tray_audio_ = new TrayAudio(this); |
| 305 AddTrayItem(base::WrapUnique(tray_audio_)); | 303 AddTrayItem(base::WrapUnique(tray_audio_)); |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 897 .work_area() | 895 .work_area() |
| 898 .height(); | 896 .height(); |
| 899 if (work_area_height > 0) { | 897 if (work_area_height > 0) { |
| 900 UMA_HISTOGRAM_CUSTOM_COUNTS( | 898 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 901 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 899 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 902 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 900 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 903 } | 901 } |
| 904 } | 902 } |
| 905 | 903 |
| 906 } // namespace ash | 904 } // namespace ash |
| OLD | NEW |