feat: add support for Web Bluetooth pin pairing (#35416)
* feat: add bluetooth pairing handler * Update docs/api/session.md Co-authored-by: Charles Kerr <charles@charleskerr.com> * Update docs/api/session.md Co-authored-by: Charles Kerr <charles@charleskerr.com> * docs: update based on review * Apply suggestions from code review Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Charles Kerr <charles@charleskerr.com> * chore: update docs per review * chore: cleanup callback per review Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: Erick Zhao <erick@hotmail.ca>
This commit is contained in:
parent
f8077cc004
commit
697a219bcb
11 changed files with 234 additions and 6 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/scoped_observation.h"
|
||||
#include "content/public/browser/bluetooth_delegate.h"
|
||||
|
@ -91,6 +92,12 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate {
|
|||
void AddFramePermissionObserver(FramePermissionObserver* observer) override;
|
||||
void RemoveFramePermissionObserver(
|
||||
FramePermissionObserver* observer) override;
|
||||
|
||||
private:
|
||||
void OnDevicePairPromptResponse(PairPromptCallback callback,
|
||||
base::Value::Dict response);
|
||||
|
||||
base::WeakPtrFactory<ElectronBluetoothDelegate> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue