 Chromium Code Reviews
 Chromium Code Reviews Issue 1382743002:
  bluetooth: Add characteristicvaluechanged event  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-notifications-1
    
  
    Issue 1382743002:
  bluetooth: Add characteristicvaluechanged event  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-notifications-1| Index: content/browser/bluetooth/bluetooth_dispatcher_host.h | 
| diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.h b/content/browser/bluetooth/bluetooth_dispatcher_host.h | 
| index 82a89230e83a8e84b7bcebce2efc7e8378277e9d..88ac158a3d859da547a410167c9621839cbef06e 100644 | 
| --- a/content/browser/bluetooth/bluetooth_dispatcher_host.h | 
| +++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h | 
| @@ -82,6 +82,10 @@ class CONTENT_EXPORT BluetoothDispatcherHost final | 
| device::BluetoothGattCharacteristic* characteristic, | 
| const std::vector<uint8>& value) override; | 
| + void NotifyActiveCharacteristic(int thread_id, | 
| 
Jeffrey Yasskin
2015/10/15 23:00:51
Comment what this function does, since it's not a
 
ortuno
2015/10/16 01:24:21
Done.
 | 
| + const std::string id, | 
| + const std::vector<uint8> value); | 
| 
Jeffrey Yasskin
2015/10/15 23:00:51
Pass these two arguments by const&. Eventually we'
 
ortuno
2015/10/16 01:24:21
Done.
 | 
| + | 
| // IPC Handlers, see definitions in bluetooth_messages.h. | 
| void OnRequestDevice( | 
| int thread_id, | 
| @@ -112,6 +116,12 @@ class CONTENT_EXPORT BluetoothDispatcherHost final | 
| void OnStopNotifications(int thread_id, | 
| int request_id, | 
| const std::string& characteristic_instance_id); | 
| + void OnRegisterCharacteristicObject( | 
| + int thread_id, | 
| + const std::string& characteristic_instance_id); | 
| + void OnUnregisterCharacteristicObject( | 
| + int thread_id, | 
| + const std::string& characteristic_instance_id); | 
| // Callbacks for BluetoothAdapter::StartDiscoverySession. | 
| void OnDiscoverySessionStarted( | 
| @@ -209,6 +219,11 @@ class CONTENT_EXPORT BluetoothDispatcherHost final | 
| scoped_ptr<device::BluetoothGattNotifySession>> | 
| characteristic_id_to_notify_session_; | 
| + // Map of characteristic_instance_id to a set of thread ids. | 
| + // A thread_id in the set represents a BluetoothDispatcher that | 
| + // needs to be notified of changes to the characteristic. | 
| + std::map<std::string, std::set<int>> active_characteristic_threads_; | 
| + | 
| // Defines how long to scan for and how long to discover services for. | 
| int current_delay_time_; |