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

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

Issue 2183903002: bluetooth: Reject getPrimaryService(s) if frame is not connected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Docs Created 4 years, 4 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 | « no previous file | content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // - Generic Access Service - Characteristics as described in 210 // - Generic Access Service - Characteristics as described in
211 // GetGenericAccessService. 211 // GetGenericAccessService.
212 // - Heart Rate Service - Characteristics as described in 212 // - Heart Rate Service - Characteristics as described in
213 // GetHeartRateService. 213 // GetHeartRateService.
214 // - Request Disconnection Service: 214 // - Request Disconnection Service:
215 // - Request Disconnection Characteristic - A write will cause the 215 // - Request Disconnection Characteristic - A write will cause the
216 // device to disconnect. 216 // device to disconnect.
217 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 217 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
218 GetDisconnectingHeartRateAdapter(); 218 GetDisconnectingHeartRateAdapter();
219 219
220 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect)
221 // Inherits from |HeartRateAdapter|
222 // Internal Structure:
223 // - Heart Rate Device
224 // - UUIDs:
225 // - Generic Access UUID (0x1800)
226 // - Heart Rate UUID (0x180d)
227 // - Services:
228 // - Generic Access Service - Characteristics as described in
229 // GetGenericAccessService.
230 // - Heart Rate Service - Characteristics as described in
231 // GetHeartRateService.
232 // - CreateGattConnection: When called before IsGattDiscoveryComplete,
233 // runs success callback with a new Gatt connection. When called
234 // after IsGattDiscoveryComplete runs success callback with a new
235 // Gatt connection and notifies of services discovered.
236 // - IsGattDiscoveryComplete: The first time this function is called,
237 // it adds two services (Generic Access and Heart Rate) and
238 // if |disconnect| is true disconnects the device and returns false.
239 // After that it just returns true.
240 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
241 GetServicesDiscoveredAfterReconnectionAdapter(bool disconnect);
242
220 // |BlacklistTestAdapter| 243 // |BlacklistTestAdapter|
221 // Inherits from |EmptyAdapter| 244 // Inherits from |EmptyAdapter|
222 // Internal Structure: 245 // Internal Structure:
223 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids) 246 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids)
224 // - UUIDs: 247 // - UUIDs:
225 // - Blacklist Test Service UUID 248 // - Blacklist Test Service UUID
226 // (611c954a-263b-4f4a-aab6-01ddb953f985) 249 // (611c954a-263b-4f4a-aab6-01ddb953f985)
227 // - Device Information UUID (0x180a) 250 // - Device Information UUID (0x180a)
228 // - Generic Access UUID (0x1800) 251 // - Generic Access UUID (0x1800)
229 // - Heart Rate UUID (0x180d) 252 // - Heart Rate UUID (0x180d)
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 643
621 // Function to turn an integer into an MAC address of the form 644 // Function to turn an integer into an MAC address of the form
622 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) 645 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef)
623 // returns "00:00:DE:AD:BE:EF". 646 // returns "00:00:DE:AD:BE:EF".
624 static std::string makeMACAddress(uint64_t addr); 647 static std::string makeMACAddress(uint64_t addr);
625 }; 648 };
626 649
627 } // namespace content 650 } // namespace content
628 651
629 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ 652 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_
OLDNEW
« no previous file with comments | « no previous file | content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698