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

Side by Side Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h

Issue 1287753002: bluetooth: Remove callback from BluetoothGattConnection::Disconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge TOT Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ EVENT_ROUTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ EVENT_ROUTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 const std::vector<uint8>& value); 313 const std::vector<uint8>& value);
314 314
315 // Called by BluetoothDevice in response to a call to CreateGattConnection. 315 // Called by BluetoothDevice in response to a call to CreateGattConnection.
316 void OnCreateGattConnection( 316 void OnCreateGattConnection(
317 bool persistent, 317 bool persistent,
318 const std::string& extension_id, 318 const std::string& extension_id,
319 const std::string& device_address, 319 const std::string& device_address,
320 const base::Closure& callback, 320 const base::Closure& callback,
321 scoped_ptr<device::BluetoothGattConnection> connection); 321 scoped_ptr<device::BluetoothGattConnection> connection);
322 322
323 // Called by BluetoothGattConnection in response to a call to Disconnect.
324 void OnDisconnect(const std::string& extension_id,
325 const std::string& device_address,
326 const base::Closure& callback);
327
328 // Called by BluetoothGattCharacteristic and BluetoothGattDescriptor in 323 // Called by BluetoothGattCharacteristic and BluetoothGattDescriptor in
329 // case of an error during the read/write operations. 324 // case of an error during the read/write operations.
330 void OnError(const ErrorCallback& error_callback, 325 void OnError(const ErrorCallback& error_callback,
331 device::BluetoothGattService::GattErrorCode error_code); 326 device::BluetoothGattService::GattErrorCode error_code);
332 327
333 // Called by BluetoothDevice in response to a call to CreateGattConnection. 328 // Called by BluetoothDevice in response to a call to CreateGattConnection.
334 void OnConnectError(const std::string& extension_id, 329 void OnConnectError(const std::string& extension_id,
335 const std::string& device_address, 330 const std::string& device_address,
336 const ErrorCallback& error_callback, 331 const ErrorCallback& error_callback,
337 device::BluetoothDevice::ConnectErrorCode error_code); 332 device::BluetoothDevice::ConnectErrorCode error_code);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // Note: This should remain the last member so it'll be destroyed and 416 // Note: This should remain the last member so it'll be destroyed and
422 // invalidate its weak pointers before any other members are destroyed. 417 // invalidate its weak pointers before any other members are destroyed.
423 base::WeakPtrFactory<BluetoothLowEnergyEventRouter> weak_ptr_factory_; 418 base::WeakPtrFactory<BluetoothLowEnergyEventRouter> weak_ptr_factory_;
424 419
425 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyEventRouter); 420 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyEventRouter);
426 }; 421 };
427 422
428 } // namespace extensions 423 } // namespace extensions
429 424
430 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_EVENT_ROUTER_H_ 425 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_EVENT_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698