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

Side by Side Diff: components/physical_web/data_source/physical_web_data_source.h

Issue 2231983002: Expose Physical Web data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cco3 comment fixes 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
« no previous file with comments | « no previous file | components/physical_web/data_source/physical_web_listener.h » ('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 2016 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_ 5 #ifndef COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_
6 #define COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_ 6 #define COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include physical_web_listner.h
11
10 namespace base { 12 namespace base {
11 class ListValue; 13 class ListValue;
12 } 14 }
13 15
14 // Helper class for accessing Physical Web metadata and controlling the scanner. 16 // Helper class for accessing Physical Web metadata and controlling the scanner.
15 class PhysicalWebDataSource { 17 class PhysicalWebDataSource {
16 public: 18 public:
17 virtual ~PhysicalWebDataSource() {} 19 virtual ~PhysicalWebDataSource() {}
18 20
19 // Starts scanning for Physical Web URLs. If |network_request_enabled| is 21 // Starts scanning for Physical Web URLs. If |network_request_enabled| is
20 // true, discovered URLs will be sent to a resolution service. 22 // true, discovered URLs will be sent to a resolution service.
21 virtual void StartDiscovery(bool network_request_enabled) = 0; 23 virtual void StartDiscovery(bool network_request_enabled) = 0;
22 24
23 // Stops scanning for Physical Web URLs and clears cached URL content. 25 // Stops scanning for Physical Web URLs and clears cached URL content.
24 virtual void StopDiscovery() = 0; 26 virtual void StopDiscovery() = 0;
25 27
26 // Returns a list of resolved URLs and associated page metadata. If network 28 // Returns a list of resolved URLs and associated page metadata. If network
27 // requests are disabled or if discovery is not active, the list will be 29 // requests are disabled or if discovery is not active, the list will be
28 // empty. The method can be called at any time to receive the current metadata 30 // empty. The method can be called at any time to receive the current metadata
29 // list. 31 // list.
30 virtual std::unique_ptr<base::ListValue> GetMetadata() = 0; 32 virtual std::unique_ptr<base::ListValue> GetMetadata() = 0;
31 33
32 // Returns boolean |true| if network requests are disabled and there are one 34 // Returns boolean |true| if network requests are disabled and there are one
33 // or more discovered URLs that have not been sent to the resolution service. 35 // or more discovered URLs that have not been sent to the resolution service.
34 // The method can be called at any time to check for unresolved discoveries. 36 // The method can be called at any time to check for unresolved discoveries.
35 // If discovery is inactive or network requests are enabled, it will always 37 // If discovery is inactive or network requests are enabled, it will always
36 // return false. 38 // return false.
37 virtual bool HasUnresolvedDiscoveries() = 0; 39 virtual bool HasUnresolvedDiscoveries() = 0;
40
41 // Register for changes to physical web URLs and associated page metadata.
42 virtual void RegisterListener(PhysicalWebListener physical_web_listner) = 0;
mattreynolds 2016/08/12 23:07:30 physical_web_listner -> physical_web_listener Cap
hayesjordan 2016/08/15 14:38:08 Done.
38 }; 43 };
39 44
40 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_ 45 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | components/physical_web/data_source/physical_web_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698