blob: 5017ea238bb551506cd38a2b9e6c326337ee5612 [file] [log] [blame]
Jack Hsiehea76b94b52022-12-13 16:37:051// 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 Hsiehea76b94b52022-12-13 16:37:058#include "ui/gfx/image/image_skia.h"
9
Lei Zhangc6d0edb2023-01-31 22:31:4910class Profile;
11
Jack Hsiehea76b94b52022-12-13 16:37:0512class 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_