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

Side by Side Diff: ios/chrome/common/physical_web/physical_web_scanner.h

Issue 2113473002: Add a Physical Web data source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move data source instance to ApplicationContext 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
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 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 @class PhysicalWebDevice; 10 #include <memory>
11
12 #include "base/values.h"
sdefresne 2016/08/04 19:23:48 nit: I think we can forward-declare base::ListValu
mattreynolds 2016/08/04 21:14:34 Done.
11 13
12 @protocol PhysicalWebScannerDelegate; 14 @protocol PhysicalWebScannerDelegate;
13 15
14 // This class will scan for physical web devices. 16 // This class will scan for physical web devices.
15 17
16 @interface PhysicalWebScanner : NSObject 18 @interface PhysicalWebScanner : NSObject
17 19
18 // When networkRequest is NO, no network request will be sent. 20 // When networkRequest is NO, no network request will be sent.
19 @property(nonatomic, assign) BOOL networkRequestEnabled; 21 @property(nonatomic, assign) BOOL networkRequestEnabled;
20 22
(...skipping 15 matching lines...) Expand all
36 // It can happen when the bluetooth is turned off. In this case, scanning will 38 // It can happen when the bluetooth is turned off. In this case, scanning will
37 // start as soon as the bluetooth is turned on. 39 // start as soon as the bluetooth is turned on.
38 - (void)start; 40 - (void)start;
39 41
40 // Stop scanning. 42 // Stop scanning.
41 - (void)stop; 43 - (void)stop;
42 44
43 // Returns a list of physical web devices (PhysicalWebDevice). 45 // Returns a list of physical web devices (PhysicalWebDevice).
44 - (NSArray*)devices; 46 - (NSArray*)devices;
45 47
48 // Returns the metadata for all resolved physical web URLs.
sdefresne 2016/08/04 19:23:47 Can you say that the method always returns a non n
mattreynolds 2016/08/04 21:14:34 Done.
49 - (std::unique_ptr<base::ListValue>)metadata;
50
46 @end 51 @end
47 52
48 @protocol PhysicalWebScannerDelegate<NSObject> 53 @protocol PhysicalWebScannerDelegate<NSObject>
49 54
50 // This delegate method is called when the list of discovered devices is updated 55 // This delegate method is called when the list of discovered devices is updated
51 // by the scanner. 56 // by the scanner.
52 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; 57 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner;
53 58
54 // This delegate method is called when the bluetooth status is updated. 59 // This delegate method is called when the bluetooth status is updated.
55 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; 60 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner;
56 61
57 @end 62 @end
58 63
59 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ 64 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698