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

Side by Side Diff: device/bluetooth/bluez/bluetooth_adapter_bluez.cc

Issue 2037173003: Notify the BluetoothAdapter::Observer when a bluetooth peripheral disconnects on Android and Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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
« no previous file with comments | « device/bluetooth/bluez/bluetooth_adapter_bluez.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" 5 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 } 982 }
983 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 983 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
984 AdapterDiscoveringChanged(this, discovering)); 984 AdapterDiscoveringChanged(this, discovering));
985 } 985 }
986 986
987 void BluetoothAdapterBlueZ::PresentChanged(bool present) { 987 void BluetoothAdapterBlueZ::PresentChanged(bool present) {
988 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 988 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
989 AdapterPresentChanged(this, present)); 989 AdapterPresentChanged(this, present));
990 } 990 }
991 991
992 void BluetoothAdapterBlueZ::NotifyDeviceChanged(BluetoothDeviceBlueZ* device) {
993 DCHECK(device);
994 DCHECK(device->adapter_ == this);
995
996 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
997 DeviceChanged(this, device));
998 }
999
1000 void BluetoothAdapterBlueZ::NotifyDeviceAddressChanged( 992 void BluetoothAdapterBlueZ::NotifyDeviceAddressChanged(
1001 BluetoothDeviceBlueZ* device, 993 BluetoothDeviceBlueZ* device,
1002 const std::string& old_address) { 994 const std::string& old_address) {
1003 DCHECK(device->adapter_ == this); 995 DCHECK(device->adapter_ == this);
1004 996
1005 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 997 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
1006 DeviceAddressChanged(this, device, old_address)); 998 DeviceAddressChanged(this, device, old_address));
1007 } 999 }
1008 1000
1009 void BluetoothAdapterBlueZ::UseProfile( 1001 void BluetoothAdapterBlueZ::UseProfile(
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 1632
1641 void BluetoothAdapterBlueZ::RegisterApplicationOnError( 1633 void BluetoothAdapterBlueZ::RegisterApplicationOnError(
1642 const base::Closure& callback, 1634 const base::Closure& callback,
1643 const device::BluetoothGattService::ErrorCallback& error_callback, 1635 const device::BluetoothGattService::ErrorCallback& error_callback,
1644 const std::string& /* error_name */, 1636 const std::string& /* error_name */,
1645 const std::string& /* error_message */) { 1637 const std::string& /* error_message */) {
1646 RegisterApplication(callback, error_callback); 1638 RegisterApplication(callback, error_callback);
1647 } 1639 }
1648 1640
1649 } // namespace bluez 1641 } // namespace bluez
OLDNEW
« no previous file with comments | « device/bluetooth/bluez/bluetooth_adapter_bluez.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698