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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h

Issue 177113013: Bluetooth: add Device events, and cleanup JS API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arman-patch
Patch Set: I suck at rebase Created 6 years, 9 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/extensions/api/bluetooth/bluetooth_event_router.h
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h
index ecc5ff85cf77e48cc9fcbeeca4ee1361c14771af..68822b02e303a4e6ced261197ec4fadf4f8628ac 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h
@@ -108,11 +108,6 @@ class ExtensionBluetoothEventRouter
// Get the BluetoothSocket corresponding to |id|.
scoped_refptr<device::BluetoothSocket> GetSocket(int id);
- // Dispatch an event that takes a device as a parameter to all renderers.
- void DispatchDeviceEvent(
- const std::string& event_name,
- const extensions::api::bluetooth::Device& device);
-
// Dispatch an event that takes a connection socket as a parameter to the
// extension that registered the profile that the socket has connected to.
void DispatchConnectionEvent(const std::string& extension_id,
@@ -129,6 +124,10 @@ class ExtensionBluetoothEventRouter
bool discovering) OVERRIDE;
virtual void DeviceAdded(device::BluetoothAdapter* adapter,
device::BluetoothDevice* device) OVERRIDE;
+ virtual void DeviceChanged(device::BluetoothAdapter* adapter,
+ device::BluetoothDevice* device) OVERRIDE;
+ virtual void DeviceRemoved(device::BluetoothAdapter* adapter,
+ device::BluetoothDevice* device) OVERRIDE;
// Overridden from content::NotificationObserver
virtual void Observe(int type,
@@ -145,6 +144,8 @@ class ExtensionBluetoothEventRouter
void InitializeAdapter(scoped_refptr<device::BluetoothAdapter> adapter);
void MaybeReleaseAdapter();
void DispatchAdapterStateEvent();
+ void DispatchDeviceEvent(const std::string& event_name,
+ device::BluetoothDevice* device);
void CleanUpForExtension(const std::string& extension_id);
void OnStartDiscoverySession(
const std::string& extension_id,

Powered by Google App Engine
This is Rietveld 408576698