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

Unified Diff: components/physical_web/data_source/physical_web_listener.h

Issue 2231983002: Expose Physical Web data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address mattreynolds comments 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 side-by-side diff with in-line comments
Download patch
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..4cf911a3318262acbe3d5b424e7cf647d400f99d
--- /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 {
Olivier 2016/08/22 07:45:09 Question: Is it possible that a beacon change URL?
cco3 2016/08/22 17:02:44 Yes, that is how we decided we would signal client
+ public:
+
+ // OnFound(url) will be called when a new url has been found.
Olivier 2016/08/22 07:45:09 NIT: when a new URL has
hayesjordan 2016/08/22 17:06:22 Done.
+ virtual void OnFound(const std::string& url) = 0;
+
+ // OnLost(url) will be called when a url can no longer be seen.
Olivier 2016/08/22 07:45:09 NIT: when a URL can no longer...
Olivier 2016/08/22 07:45:09 (for my personnal knowledge: is this timeout based
cco3 2016/08/22 17:02:44 Yes. We don't have a particular timeout chosen fo
hayesjordan 2016/08/22 17:06:22 Done.
+ virtual void OnLost(const std::string& url) = 0;
+
+ // OnDistanceChagned(url, distance_estimate) will be called when the distance
+ // estimate is changed for the url.
Olivier 2016/08/22 07:45:09 nit: for the URL.
hayesjordan 2016/08/22 17:06:22 Done.
+ virtual void OnDistanceChanged(const std::string& url,
+ double distance_estimate) = 0;
+};
+
+#endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_LISTENER_H_

Powered by Google App Engine
This is Rietveld 408576698