usb_peripheral_notification_controller.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2021 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. #ifndef ASH_SYSTEM_USB_PERIPHERAL_USB_PERIPHERAL_NOTIFICATION_CONTROLLER_H_
  5. #define ASH_SYSTEM_USB_PERIPHERAL_USB_PERIPHERAL_NOTIFICATION_CONTROLLER_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/components/peripheral_notification/peripheral_notification_manager.h"
  8. class PrefRegistrySimple;
  9. namespace message_center {
  10. class MessageCenter;
  11. } // namespace message_center
  12. namespace ash {
  13. class ASH_EXPORT UsbPeripheralNotificationController
  14. : public PeripheralNotificationManager::Observer {
  15. public:
  16. explicit UsbPeripheralNotificationController(
  17. message_center::MessageCenter* message_center);
  18. UsbPeripheralNotificationController(
  19. const UsbPeripheralNotificationController&) = delete;
  20. UsbPeripheralNotificationController& operator=(
  21. const UsbPeripheralNotificationController&) = delete;
  22. ~UsbPeripheralNotificationController() override;
  23. static void RegisterProfilePrefs(PrefRegistrySimple* registry);
  24. // Called after parent class is initialized.
  25. void OnPeripheralNotificationManagerInitialized();
  26. // PeripheralNotificationManager::Observer:
  27. void OnInvalidDpCableWarning() override;
  28. void OnInvalidUSB4ValidTBTCableWarning() override;
  29. void OnInvalidUSB4CableWarning() override;
  30. void OnInvalidTBTCableWarning() override;
  31. void OnSpeedLimitingCableWarning() override;
  32. // Stubs from PCIE Notification controller
  33. void OnLimitedPerformancePeripheralReceived() override {}
  34. void OnGuestModeNotificationReceived(bool is_thunderbolt_only) override {}
  35. void OnPeripheralBlockedReceived() override {}
  36. void OnBillboardDeviceConnected() override {}
  37. private:
  38. message_center::MessageCenter* const message_center_;
  39. };
  40. } // namespace ash
  41. #endif // ASH_SYSTEM_USB_PERIPHERAL_USB_PERIPHERAL_NOTIFICATION_CONTROLLER_H_