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

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

Issue 2447593002: bluetooth: Require frame to be connected for startNotifications to succeed. (Closed)
Patch Set: Remove stopNotifications code Created 4 years, 1 month 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // - Services: 310 // - Services:
311 // - Generic Access Service - Characteristics as described in 311 // - Generic Access Service - Characteristics as described in
312 // GetGenericAccessService. 312 // GetGenericAccessService.
313 // - Request Disconnection Service: - Characteristics as described in 313 // - Request Disconnection Service: - Characteristics as described in
314 // GetDisconnectingService 314 // GetDisconnectingService
315 // - Health Thermometer: 315 // - Health Thermometer:
316 // - Measurement Interval (0x2a21): 316 // - Measurement Interval (0x2a21):
317 // - Read: Calls GattCharacteristicValueChanged and success 317 // - Read: Calls GattCharacteristicValueChanged and success
318 // callback with [1]. 318 // callback with [1].
319 // - Write: Calls success callback. 319 // - Write: Calls success callback.
320 // - StartNotifySession: Run success callback.
320 // - GetProperties: Returns 321 // - GetProperties: Returns
321 // BluetoothRemoteGattCharacteristic::PROPERTY_READ 322 // BluetoothRemoteGattCharacteristic::PROPERTY_READ
322 // TODO(crbug.com/608538): Mock Write and StartNotifySession.
323 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 323 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
324 GetDisconnectingHealthThermometer(); 324 GetDisconnectingHealthThermometer();
325 325
326 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) 326 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect)
327 // Inherits from |HeartRateAdapter| 327 // Inherits from |HeartRateAdapter|
328 // Internal Structure: 328 // Internal Structure:
329 // - Heart Rate Device 329 // - Heart Rate Device
330 // - UUIDs: 330 // - UUIDs:
331 // - Generic Access UUID (0x1800) 331 // - Generic Access UUID (0x1800)
332 // - Heart Rate UUID (0x180d) 332 // - Heart Rate UUID (0x180d)
(...skipping 26 matching lines...) Expand all
359 // - Health Thermometer 359 // - Health Thermometer
360 // - Measurement Interval: 360 // - Measurement Interval:
361 // - Read: If |succeeds| is true, saves a succeeding callback, 361 // - Read: If |succeeds| is true, saves a succeeding callback,
362 // otherwise it saves a failing callback. This callback 362 // otherwise it saves a failing callback. This callback
363 // is run during CreateGattConnection. If |disconnect| is true 363 // is run during CreateGattConnection. If |disconnect| is true
364 // disconnects the device. 364 // disconnects the device.
365 // - Write: If |succeeds| is true, saves a succeeding callback, 365 // - Write: If |succeeds| is true, saves a succeeding callback,
366 // otherwise it saves a failing callback. This callback is run 366 // otherwise it saves a failing callback. This callback is run
367 // during CreateGattConnection. If |disconnect| is true 367 // during CreateGattConnection. If |disconnect| is true
368 // disconnects the device. 368 // disconnects the device.
369 // - StartNotifySession: If |succeeds| is true, saves a
370 // succeeding callback, otherwise it saves a failing callback.
371 // This calback is run during CreateGattConnection. If
372 // |disconnect| is true disconnects the device.
369 // - CreateGattConnection: Runs success callback with a new GATT 373 // - CreateGattConnection: Runs success callback with a new GATT
370 // connection and runs any pending GATT operation callbacks. 374 // connection and runs any pending GATT operation callbacks.
371 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 375 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
372 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect, 376 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect,
373 bool succeeds); 377 bool succeeds);
374 378
375 // |BlacklistTestAdapter| 379 // |BlacklistTestAdapter|
376 // Inherits from |EmptyAdapter| 380 // Inherits from |EmptyAdapter|
377 // Internal Structure: 381 // Internal Structure:
378 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids) 382 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids)
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 805
802 // Function to turn an integer into an MAC address of the form 806 // Function to turn an integer into an MAC address of the form
803 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) 807 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef)
804 // returns "00:00:DE:AD:BE:EF". 808 // returns "00:00:DE:AD:BE:EF".
805 static std::string makeMACAddress(uint64_t addr); 809 static std::string makeMACAddress(uint64_t addr);
806 }; 810 };
807 811
808 } // namespace content 812 } // namespace content
809 813
810 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ 814 #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