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

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

Issue 2648973004: Remove GetMetadata from PhysicalWebDataSource and PhysicalWebScanner (Closed)
Patch Set: Created 3 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 #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 #include <vector> 11 #include <vector>
12 12
13 namespace base {
14 class ListValue;
15 }
16
17 namespace physical_web { 13 namespace physical_web {
18 struct Metadata; 14 struct Metadata;
19 using MetadataList = std::vector<Metadata>; 15 using MetadataList = std::vector<Metadata>;
20 } 16 }
21 17
22 @protocol PhysicalWebScannerDelegate; 18 @protocol PhysicalWebScannerDelegate;
23 19
24 // This class will scan for physical web devices. 20 // This class will scan for physical web devices.
25 21
26 @interface PhysicalWebScanner : NSObject 22 @interface PhysicalWebScanner : NSObject
(...skipping 25 matching lines...) Expand all
52 // start as soon as the bluetooth is turned on. 48 // start as soon as the bluetooth is turned on.
53 - (void)start; 49 - (void)start;
54 50
55 // Stop scanning. 51 // Stop scanning.
56 - (void)stop; 52 - (void)stop;
57 53
58 // Returns a list of physical web devices (PhysicalWebDevice). 54 // Returns a list of physical web devices (PhysicalWebDevice).
59 - (NSArray*)devices; 55 - (NSArray*)devices;
60 56
61 // Returns the metadata for all resolved physical web URLs. The returned value 57 // Returns the metadata for all resolved physical web URLs. The returned value
62 // will never be nil; if no metadata has been received then an empty list is 58 // will never be nil; if no metadata has been received then an empty list is
sdefresne 2017/01/24 09:54:38 nit: nil -> null (since this is a C++ smart pointe
mattreynolds 2017/01/24 19:11:44 Done.
63 // returned. 59 // returned.
64 - (std::unique_ptr<base::ListValue>)metadata;
65
66 // Returns the metadata for all resolved physical web URLs. The returned value
67 // will never be nil; if no metadata has been received then an empty list is
68 // returned.
69 - (std::unique_ptr<physical_web::MetadataList>)metadataList; 60 - (std::unique_ptr<physical_web::MetadataList>)metadataList;
70 61
71 @end 62 @end
72 63
73 @protocol PhysicalWebScannerDelegate<NSObject> 64 @protocol PhysicalWebScannerDelegate<NSObject>
74 65
75 // This delegate method is called when the list of discovered devices is updated 66 // This delegate method is called when the list of discovered devices is updated
76 // by the scanner. 67 // by the scanner.
77 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner; 68 - (void)scannerUpdatedDevices:(PhysicalWebScanner*)scanner;
78 69
79 // This delegate method is called when the bluetooth status is updated. 70 // This delegate method is called when the bluetooth status is updated.
80 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner; 71 - (void)scannerBluetoothStatusUpdated:(PhysicalWebScanner*)scanner;
81 72
82 @end 73 @end
83 74
84 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_ 75 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_SCANNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698