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

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

Issue 2113473002: Add a Physical Web data source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix include order 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_COMMON_PHYSICAL_WEB_IOS_CHROME_PHYSICAL_WEB_DATA_SOURCE_H_
6 #define IOS_CHROME_COMMON_PHYSICAL_WEB_IOS_CHROME_PHYSICAL_WEB_DATA_SOURCE_H_
7
8 #include "base/macros.h"
9 #include "base/values.h"
10 #import "base/mac/scoped_nsobject.h"
11 #include "components/physical_web/data_source/physical_web_data_source.h"
12 #import "ios/chrome/common/physical_web/physical_web_scanner.h"
13
14 // iOS implementation of PhysicalWebDataSource
blundell 2016/07/28 11:12:25 Will this class only be used by Chrome on iOS (i.e
mattreynolds 2016/07/29 01:36:31 The Today extension will most likely not use this
15 class IOSChromePhysicalWebDataSource : public PhysicalWebDataSource {
16 public:
17 IOSChromePhysicalWebDataSource();
18 ~IOSChromePhysicalWebDataSource() override;
19
20 // Starts scanning for Physical Web URLs. If |network_request_enabled| is
21 // true, discovered URLs will be sent to a resolution service.
22 void StartDiscovery(bool network_request_enabled) override;
23
24 // Stops scanning for Physical Web URLs and clears cached URL content.
25 void StopDiscovery() override;
26
27 // Returns a list of resolved URLs and associated page metadata. If network
28 // requests are disabled, the list will be empty.
29 std::unique_ptr<base::ListValue> GetMetadata() override;
30
31 // Returns boolean |true| if network requests are disabled and there are one
32 // or more discovered URLs that have not been sent to the resolution service.
33 bool HasUnresolvedDiscoveries() override;
34
35 private:
36 // Scanner for nearby Physical Web URL devices.
37 base::scoped_nsobject<PhysicalWebScanner> scanner_;
38
39 DISALLOW_COPY_AND_ASSIGN(IOSChromePhysicalWebDataSource);
40 };
41
42 #endif // IOS_CHROME_COMMON_PHYSICAL_WEB_IOS_CHROME_PHYSICAL_WEB_DATA_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698