| OLD | NEW |
| 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 IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ | 5 #ifndef IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ |
| 6 #define IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ | 6 #define IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class ListValue; | 13 class ListValue; |
| 14 } | 14 } |
| 15 | 15 |
| 16 @protocol PhysicalWebScannerDelegate; | 16 @protocol PhysicalWebScannerDelegate; |
| 17 | 17 |
| 18 // This class will scan for physical web devices. | 18 // This class will scan for physical web devices. |
| 19 | 19 |
| 20 @interface PhysicalWebScanner : NSObject | 20 @interface PhysicalWebScanner : NSObject |
| 21 | 21 |
| 22 // When onLostDetectionEnabled is YES, the delegate will be notified if a URL |
| 23 // that was previously nearby is no longer detected. |
| 24 @property(nonatomic, assign) BOOL onLostDetectionEnabled; |
| 25 |
| 22 // When networkRequest is NO, no network request will be sent. | 26 // When networkRequest is NO, no network request will be sent. |
| 23 @property(nonatomic, assign) BOOL networkRequestEnabled; | 27 @property(nonatomic, assign) BOOL networkRequestEnabled; |
| 24 | 28 |
| 25 // When networkRequest is NO, it returns the number of discovered beacons. | 29 // When networkRequest is NO, it returns the number of discovered beacons. |
| 26 @property(nonatomic, readonly) int unresolvedBeaconsCount; | 30 @property(nonatomic, readonly) int unresolvedBeaconsCount; |
| 27 | 31 |
| 28 // Whether bluetooth is enabled. Must not be read before the first call of | 32 // Whether bluetooth is enabled. Must not be read before the first call of |
| 29 // scannerBluetoothStatusUpdated. | 33 // scannerBluetoothStatusUpdated. |
| 30 @property(nonatomic, readonly) BOOL bluetoothEnabled; | 34 @property(nonatomic, readonly) BOOL bluetoothEnabled; |
| 31 | 35 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 59 // This delegate method is called when the list of discovered devices is updated | 63 // This delegate method is called when the list of discovered devices is updated |
| 60 // by the scanner. | 64 // by the scanner. |
| 61 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; | 65 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; |
| 62 | 66 |
| 63 // This delegate method is called when the bluetooth status is updated. | 67 // This delegate method is called when the bluetooth status is updated. |
| 64 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; | 68 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; |
| 65 | 69 |
| 66 @end | 70 @end |
| 67 | 71 |
| 68 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ | 72 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ |
| OLD | NEW |