Chromium Code Reviews| Index: components/physical_web/data_source/physical_web_listener.h |
| diff --git a/components/physical_web/data_source/physical_web_listener.h b/components/physical_web/data_source/physical_web_listener.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9a74e3fcd8f41a69fdbe8ce11d958e6d098b98a0 |
| --- /dev/null |
| +++ b/components/physical_web/data_source/physical_web_listener.h |
| @@ -0,0 +1,26 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_LISTENER_H_ |
| +#define COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_LISTENER_H_ |
| + |
| +#include <string> |
| + |
| +// Class for being notified when Physical Web data changes. |
| +class PhysicalWebListener { |
| + public: |
| + |
| + // OnFound(url) will be called when a new url has been found. |
| + virtual void OnFound(const string& url) = 0; |
|
mattreynolds
2016/08/16 17:35:46
Use std::string
hayesjordan
2016/08/16 17:40:31
Done.
|
| + |
| + // OnLost(url) will be called when a url can no longer be seen. |
| + virtual void OnLost(const string& url) = 0; |
| + |
| + // OnDistanceChagned(url, distance_estimate) will be called when the distance |
| + // estimate is changed for the url. |
| + virtual void OnDistanceChanged(const string& url, |
| + double distance_estimate) = 0; |
| +}; |
| + |
| +#endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_LISTENER_H_ |