blob: 49fadbf3a60c77e6cabeb6b6e4d2d93e4f446ad7 [file] [log] [blame]
Jack Hsiehaba560282022-12-12 17:36:531// 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#include "chrome/browser/hid/hid_connection_tracker.h"
6
Jack Hsiehaba560282022-12-12 17:36:537#include "chrome/browser/browser_process.h"
Jack Hsiehea76b94b52022-12-13 16:37:058#include "chrome/browser/hid/hid_system_tray_icon.h"
Jack Hsiehaba560282022-12-12 17:36:539#include "chrome/browser/ui/chrome_pages.h"
Jack Hsiehc4441222023-04-21 20:44:5310
Jack Hsiehaba560282022-12-12 17:36:5311HidConnectionTracker::HidConnectionTracker(Profile* profile)
Juan Garza Sanchez687e50f2023-09-14 00:26:0712 : DeviceConnectionTracker(profile) {
13 whitelisted_origins_.push_back(url::Origin::Create(
14 GURL("chrome-extension://ckcendljdlmgnhghiaomidhiiclmapok")));
15 whitelisted_origins_.push_back(url::Origin::Create(
16 GURL("chrome-extension://lfboplenmmjcmpbkeemecobbadnmpfhi")));
17}
Jack Hsiehaba560282022-12-12 17:36:5318
Jack Hsiehe057e1552023-05-19 17:14:0619HidConnectionTracker::~HidConnectionTracker() = default;
Jack Hsiehaba560282022-12-12 17:36:5320
Jack Hsiehe1371152023-04-15 10:04:2221void HidConnectionTracker::ShowContentSettingsExceptions() {
Jack Hsiehaba560282022-12-12 17:36:5322 chrome::ShowContentSettingsExceptionsForProfile(
23 profile_, ContentSettingsType::HID_CHOOSER_DATA);
24}
25
Jack Hsiehe057e1552023-05-19 17:14:0626DeviceSystemTrayIcon* HidConnectionTracker::GetSystemTrayIcon() {
27 return static_cast<DeviceSystemTrayIcon*>(
28 g_browser_process->hid_system_tray_icon());
Jack Hsiehaba560282022-12-12 17:36:5329}
Sylvain Defresnead5329c2024-07-08 09:38:3030
31void HidConnectionTracker::Shutdown() {
32 CleanUp();
33 DeviceConnectionTracker::Shutdown();
34}