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

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge.h

Issue 2223203002: arc: bluetooth: Add/Remove BT observer only when ARC is ready (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix #2 comment 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: components/arc/bluetooth/arc_bluetooth_bridge.h
diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.h b/components/arc/bluetooth/arc_bluetooth_bridge.h
index f8b7150c768c09c130b7ecb9306dfe379a473a7b..af7ef294c5590b6f1de0093f8de98c4590b0f303 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge.h
+++ b/components/arc/bluetooth/arc_bluetooth_bridge.h
@@ -45,6 +45,7 @@ class ArcBluetoothBridge
// Overridden from InstanceHolder<mojom::BluetoothInstance>::Observer:
void OnInstanceReady() override;
+ void OnInstanceClosed() override;
void OnAdapterInitialized(scoped_refptr<device::BluetoothAdapter> adapter);
@@ -364,6 +365,7 @@ class ArcBluetoothBridge
mojo::Binding<mojom::BluetoothHost> binding_;
scoped_refptr<bluez::BluetoothAdapterBlueZ> bluetooth_adapter_;
+ bool bluetooth_observer_flag_ = false;
rkc 2016/08/08 21:58:29 The correct solution is just to add a HasObserver
scoped_refptr<device::BluetoothAdvertisement> advertisment_;
std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_;
std::unordered_map<std::string,
« no previous file with comments | « no previous file | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('j') | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698