system_notification_controller.cc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/system/system_notification_controller.h"
  5. #include "ash/constants/ash_features.h"
  6. #include "ash/system/caps_lock_notification_controller.h"
  7. #include "ash/system/cast/cast_notification_controller.h"
  8. #include "ash/system/gesture_education/gesture_education_notification_controller.h"
  9. #include "ash/system/microphone_mute/microphone_mute_notification_controller.h"
  10. #include "ash/system/network/auto_connect_notifier.h"
  11. #include "ash/system/network/cellular_setup_notifier.h"
  12. #include "ash/system/network/managed_sim_lock_notifier.h"
  13. #include "ash/system/network/wifi_toggle_notification_controller.h"
  14. #include "ash/system/power/power_notification_controller.h"
  15. #include "ash/system/screen_security/screen_security_notification_controller.h"
  16. #include "ash/system/session/session_limit_notification_controller.h"
  17. #include "ash/system/tracing_notification_controller.h"
  18. #include "ash/system/update/update_notification_controller.h"
  19. #include "ui/message_center/message_center.h"
  20. namespace ash {
  21. SystemNotificationController::SystemNotificationController()
  22. : auto_connect_(std::make_unique<AutoConnectNotifier>()),
  23. caps_lock_(std::make_unique<CapsLockNotificationController>()),
  24. cast_(std::make_unique<CastNotificationController>()),
  25. cellular_setup_notifier_(std::make_unique<ash::CellularSetupNotifier>()),
  26. gesture_education_(
  27. std::make_unique<GestureEducationNotificationController>()),
  28. power_(std::make_unique<PowerNotificationController>(
  29. message_center::MessageCenter::Get())),
  30. screen_security_(
  31. std::make_unique<ScreenSecurityNotificationController>()),
  32. session_limit_(std::make_unique<SessionLimitNotificationController>()),
  33. tracing_(std::make_unique<TracingNotificationController>()),
  34. update_(std::make_unique<UpdateNotificationController>()),
  35. wifi_toggle_(std::make_unique<WifiToggleNotificationController>()) {
  36. if (features::IsMicMuteNotificationsEnabled()) {
  37. microphone_mute_ = std::make_unique<MicrophoneMuteNotificationController>();
  38. }
  39. if (features::IsSimLockPolicyEnabled()) {
  40. managed_sim_lock_notifier_ =
  41. std::make_unique<ash::ManagedSimLockNotifier>();
  42. }
  43. }
  44. SystemNotificationController::~SystemNotificationController() = default;
  45. } // namespace ash