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 #ifndef COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_ | |
| 5 #define COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_ | |
| 6 | |
| 7 #include "base/observer_list.h" | |
| 8 #include "components/physical_web/data_source/physical_web_data_source.h" | |
| 9 | |
| 10 class PhysicalWebListener; | |
| 11 | |
| 12 class PhysicalWebDataSourceImpl : public PhysicalWebDataSource { | |
| 13 public: | |
| 14 PhysicalWebDataSourceImpl(); | |
| 15 ~PhysicalWebDataSourceImpl() override; | |
| 16 | |
| 17 // Register for changes to Physical Web URLs and associated page metadata. | |
| 18 void RegisterListener(PhysicalWebListener* physical_web_listener) override; | |
| 19 | |
| 20 // Unregister for changes to Physical Web URLs and associated page metadata. | |
| 21 void UnregisterListener(PhysicalWebListener* physical_web_listener) override; | |
| 22 | |
| 23 // Notify all register listeners, that a URL has been found. | |
|
mattreynolds
2016/09/20 22:49:33
register -> registered
Also, the comma is unneces
hayesjordan
2016/09/21 20:47:43
Done.
| |
| 24 void NotifyOnFound(const std::string& url); | |
| 25 | |
| 26 // Notify all register listeners, that a URL has been lost. | |
| 27 void NotifyOnLost(const std::string& url); | |
| 28 | |
| 29 // Notify all register listeners, that a distance has changed for a URL. | |
| 30 void NotifyOnDistanceChanged(const std::string& url, | |
| 31 double distance_estimate); | |
| 32 | |
| 33 private: | |
| 34 base::ObserverList<PhysicalWebListener> observer_list_; | |
| 35 }; | |
| 36 | |
| 37 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_ | |
| OLD | NEW |