This function is not in `ChromeContentBrowserClient` anymore, but rather it has been moved into `BluetoothDelegate`. We subclass `ChromeBluetoothDelegate` and return it in `BraveContentBrowserClient::GetBluetoothDelegate` to handle our additional behavior. Chromium changes: https://chromium.googlesource.com/chromium/src/+/3cb4ab67d10e551c2fd9b30c1bdb8cad6bd2d749 commit 3cb4ab67d10e551c2fd9b30c1bdb8cad6bd2d749 Author: wuguobin <wuguobin.1229@bytedance.com> Date: Thu Mar 26 09:09:25 2026 -0700 Move Bluetooth related methods from ContentBrowserClient to BluetoothDelegate This CL moves ContentBrowserClient Bluetooth interfaces to BluetoothDelegate: - AllowWebBluetooth - GetWebBluetoothBlocklist - IsBluetoothScanningBlocked - BlockBluetoothScanning Bug: 40117221 Change-Id: I5f6430ac25f712cbcfa848fe6b8ed48c0aa7f7f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7683694 Auto-Submit: Guobin Wu <wuguobin.1229@bytedance.com> Commit-Queue: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1605572}
29 lines
941 B
C++
29 lines
941 B
C++
/* Copyright (c) 2026 The Brave Authors. All rights reserved.
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef BRAVE_BROWSER_BLUETOOTH_BRAVE_BLUETOOTH_DELEGATE_H_
|
|
#define BRAVE_BROWSER_BLUETOOTH_BRAVE_BLUETOOTH_DELEGATE_H_
|
|
|
|
#include <memory>
|
|
|
|
#include "chrome/browser/bluetooth/chrome_bluetooth_delegate.h"
|
|
#include "url/origin.h"
|
|
|
|
namespace content {
|
|
class BrowserContext;
|
|
}
|
|
|
|
class BraveBluetoothDelegate : public ChromeBluetoothDelegate {
|
|
public:
|
|
explicit BraveBluetoothDelegate(std::unique_ptr<Client> client);
|
|
|
|
AllowWebBluetoothResult AllowWebBluetooth(
|
|
content::BrowserContext* browser_context,
|
|
const url::Origin& requesting_origin,
|
|
const url::Origin& embedding_origin) override;
|
|
};
|
|
|
|
#endif // BRAVE_BROWSER_BLUETOOTH_BRAVE_BLUETOOTH_DELEGATE_H_
|