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

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

Issue 2528893003: [PhysicalWeb] Add physical_web namespace. (Closed)
Patch Set: Created 4 years 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
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 #ifndef COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_ 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_ 5 #define COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "components/physical_web/data_source/physical_web_data_source.h" 8 #include "components/physical_web/data_source/physical_web_data_source.h"
9 9
10 namespace physical_web {
11
10 class PhysicalWebListener; 12 class PhysicalWebListener;
11 13
12 class PhysicalWebDataSourceImpl : public PhysicalWebDataSource { 14 class PhysicalWebDataSourceImpl : public PhysicalWebDataSource {
13 public: 15 public:
14 PhysicalWebDataSourceImpl(); 16 PhysicalWebDataSourceImpl();
15 ~PhysicalWebDataSourceImpl() override; 17 ~PhysicalWebDataSourceImpl() override;
16 18
17 // Register for changes to Physical Web URLs and associated page metadata. 19 // Register for changes to Physical Web URLs and associated page metadata.
18 void RegisterListener(PhysicalWebListener* physical_web_listener) override; 20 void RegisterListener(PhysicalWebListener* physical_web_listener) override;
19 21
20 // Unregister for changes to Physical Web URLs and associated page metadata. 22 // Unregister for changes to Physical Web URLs and associated page metadata.
21 void UnregisterListener(PhysicalWebListener* physical_web_listener) override; 23 void UnregisterListener(PhysicalWebListener* physical_web_listener) override;
22 24
23 // Notify all registered listeners that a URL has been found. 25 // Notify all registered listeners that a URL has been found.
24 void NotifyOnFound(const std::string& url); 26 void NotifyOnFound(const std::string& url);
25 27
26 // Notify all registered listeners that a URL has been lost. 28 // Notify all registered listeners that a URL has been lost.
27 void NotifyOnLost(const std::string& url); 29 void NotifyOnLost(const std::string& url);
28 30
29 // Notify all registered listeners that a distance has changed for a URL. 31 // Notify all registered listeners that a distance has changed for a URL.
30 void NotifyOnDistanceChanged(const std::string& url, 32 void NotifyOnDistanceChanged(const std::string& url,
31 double distance_estimate); 33 double distance_estimate);
32 34
33 private: 35 private:
34 base::ObserverList<PhysicalWebListener> observer_list_; 36 base::ObserverList<PhysicalWebListener> observer_list_;
35 }; 37 };
36 38
39 } // namespace physical_web
40
37 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_ 41 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698