Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_ | |
| 6 #define COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/values.h" | |
|
sdefresne
2016/08/04 19:23:47
nit: I think you can remove this include and inste
mattreynolds
2016/08/04 21:14:34
Done.
| |
| 11 | |
| 12 // Helper class for accessing Physical Web metadata and controlling the scanner. | |
| 13 class PhysicalWebDataSource { | |
| 14 public: | |
| 15 virtual ~PhysicalWebDataSource() {}; | |
|
sdefresne
2016/08/04 19:23:47
Remove the trailing semi-colon here.
mattreynolds
2016/08/04 21:14:34
Done.
| |
| 16 | |
| 17 // Starts scanning for Physical Web URLs. If |network_request_enabled| is | |
| 18 // true, discovered URLs will be sent to a resolution service. | |
| 19 virtual void StartDiscovery(bool network_request_enabled) = 0; | |
| 20 | |
| 21 // Stops scanning for Physical Web URLs and clears cached URL content. | |
| 22 virtual void StopDiscovery() = 0; | |
| 23 | |
| 24 // Returns a list of resolved URLs and associated page metadata. If network | |
| 25 // requests are disabled or if discovery is not active, the list will be | |
| 26 // empty. The method can be called at any time to receive the current metadata | |
| 27 // list. | |
| 28 virtual std::unique_ptr<base::ListValue> GetMetadata() = 0; | |
| 29 | |
| 30 // Returns boolean |true| if network requests are disabled and there are one | |
| 31 // or more discovered URLs that have not been sent to the resolution service. | |
| 32 // The method can be called at any time to check for unresolved discoveries. | |
| 33 // If discovery is inactive or network requests are enabled, it will always | |
| 34 // return false. | |
| 35 virtual bool HasUnresolvedDiscoveries() = 0; | |
| 36 }; | |
| 37 | |
| 38 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_ | |
| OLD | NEW |