Jack Hsieh | ea76b94b5 | 2022-12-13 16:37:05 | [diff] [blame] | 1 | // Copyright 2022 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_HID_HID_SYSTEM_TRAY_ICON_H_ |
| 6 | #define CHROME_BROWSER_HID_HID_SYSTEM_TRAY_ICON_H_ |
| 7 | |
Jack Hsieh | ea76b94b5 | 2022-12-13 16:37:05 | [diff] [blame] | 8 | #include "ui/gfx/image/image_skia.h" |
| 9 | |
Lei Zhang | c6d0edb | 2023-01-31 22:31:49 | [diff] [blame^] | 10 | class Profile; |
| 11 | |
Jack Hsieh | ea76b94b5 | 2022-12-13 16:37:05 | [diff] [blame] | 12 | class HidSystemTrayIcon { |
| 13 | public: |
| 14 | HidSystemTrayIcon() = default; |
| 15 | HidSystemTrayIcon(const HidSystemTrayIcon&) = delete; |
| 16 | HidSystemTrayIcon& operator=(const HidSystemTrayIcon&) = delete; |
| 17 | virtual ~HidSystemTrayIcon() = default; |
| 18 | |
| 19 | // Add a profile to the system tray icon. |
| 20 | virtual void AddProfile(Profile* profile) = 0; |
| 21 | |
| 22 | // Remove a profile from the system tray icon. |
| 23 | virtual void RemoveProfile(Profile* profile) = 0; |
| 24 | |
| 25 | // Notify the system tray icon the connection count of the |profile| has |
| 26 | // changed. |
| 27 | virtual void NotifyConnectionCountUpdated(Profile* profile) = 0; |
| 28 | |
| 29 | protected: |
| 30 | // Get the image for the status tray icon. |
| 31 | static gfx::ImageSkia GetStatusTrayIcon(); |
| 32 | |
| 33 | // Get the label of the button for managing HID device permission on the HID |
| 34 | // system tray icon. |
| 35 | static std::u16string GetManageHidDeviceButtonLabel(Profile* profile); |
| 36 | |
| 37 | // Get the label of the tooltip of the HID system tray icon. |
| 38 | static std::u16string GetTooltipLabel(size_t num_devices); |
| 39 | }; |
| 40 | |
| 41 | #endif // CHROME_BROWSER_HID_HID_SYSTEM_TRAY_ICON_H_ |