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

Side by Side Diff: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc

Issue 1592733002: Clear the BLE services list on disconnect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the bluetooth/getPrimaryService.html timeout issue Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provid er.h" 5 #include "content/shell/browser/layout_test/layout_test_bluetooth_adapter_provid er.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 std::set<BluetoothUUID> GetUUIDs( 109 std::set<BluetoothUUID> GetUUIDs(
110 const device::BluetoothDiscoveryFilter* filter) { 110 const device::BluetoothDiscoveryFilter* filter) {
111 std::set<BluetoothUUID> result; 111 std::set<BluetoothUUID> result;
112 filter->GetUUIDs(result); 112 filter->GetUUIDs(result);
113 return result; 113 return result;
114 } 114 }
115 115
116 // Notifies the adapter's observers that the services have been discovered. 116 // Notifies the adapter's observers that the services have been discovered.
117 void NotifyServicesDiscovered(MockBluetoothAdapter* adapter, 117 void NotifyServicesDiscovered(MockBluetoothAdapter* adapter,
118 MockBluetoothDevice* device) { 118 MockBluetoothDevice* device) {
119 device->SetGattServicesDiscoveryComplete(true);
119 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, adapter->GetObservers(), 120 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, adapter->GetObservers(),
120 GattServicesDiscovered(adapter, device)); 121 GattServicesDiscovered(adapter, device));
121 } 122 }
122 123
123 } // namespace 124 } // namespace
124 125
125 namespace content { 126 namespace content {
126 127
127 // static 128 // static
128 scoped_refptr<BluetoothAdapter> 129 scoped_refptr<BluetoothAdapter>
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 return BluetoothUUID(); 877 return BluetoothUUID();
877 } 878 }
878 879
879 // static 880 // static
880 std::string LayoutTestBluetoothAdapterProvider::makeMACAddress(uint64_t addr) { 881 std::string LayoutTestBluetoothAdapterProvider::makeMACAddress(uint64_t addr) {
881 return BluetoothDevice::CanonicalizeAddress( 882 return BluetoothDevice::CanonicalizeAddress(
882 base::StringPrintf("%012" PRIx64, addr)); 883 base::StringPrintf("%012" PRIx64, addr));
883 } 884 }
884 885
885 } // namespace content 886 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bluetooth/bluetooth_dispatcher_host.cc ('k') | device/bluetooth/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698