Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7521)

Unified Diff: chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.cc

Issue 2203103003: Reset Bluetooth EventHandler when it is invalid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added CONTENT_EXPORT Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.cc
diff --git a/chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.cc b/chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.cc
index f24e4a9585052940e792715b24895e1c1dd04303..d717d247feea14d8f0e8b6bda70dce4e52122569 100644
--- a/chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.cc
+++ b/chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.cc
@@ -13,7 +13,12 @@ BluetoothChooserDesktop::BluetoothChooserDesktop(
DCHECK(bluetooth_chooser_controller_);
}
-BluetoothChooserDesktop::~BluetoothChooserDesktop() {}
+BluetoothChooserDesktop::~BluetoothChooserDesktop() {
+ // This satisfies the WebContentsDelegate::RunBluetoothChooser() requirement
+ // that the EventHandler can be destroyed any time after the BluetoothChooser
+ // instance.
+ bluetooth_chooser_controller_->ResetEventHandler();
+}
void BluetoothChooserDesktop::SetAdapterPresence(AdapterPresence presence) {
bluetooth_chooser_controller_->OnAdapterPresenceChanged(presence);
« no previous file with comments | « chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc ('k') | content/browser/bluetooth/bluetooth_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698