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

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

Issue 2565023002: Use GURLs in Physical Web data source (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 #include "url/gurl.h"
9 10
10 namespace physical_web { 11 namespace physical_web {
11 12
12 class PhysicalWebListener; 13 class PhysicalWebListener;
13 14
14 class PhysicalWebDataSourceImpl : public PhysicalWebDataSource { 15 class PhysicalWebDataSourceImpl : public PhysicalWebDataSource {
15 public: 16 public:
16 PhysicalWebDataSourceImpl(); 17 PhysicalWebDataSourceImpl();
17 ~PhysicalWebDataSourceImpl() override; 18 ~PhysicalWebDataSourceImpl() override;
18 19
19 // Register for changes to Physical Web URLs and associated page metadata. 20 // Register for changes to Physical Web URLs and associated page metadata.
20 void RegisterListener(PhysicalWebListener* physical_web_listener) override; 21 void RegisterListener(PhysicalWebListener* physical_web_listener) override;
21 22
22 // Unregister for changes to Physical Web URLs and associated page metadata. 23 // Unregister for changes to Physical Web URLs and associated page metadata.
23 void UnregisterListener(PhysicalWebListener* physical_web_listener) override; 24 void UnregisterListener(PhysicalWebListener* physical_web_listener) override;
24 25
25 // Notify all registered listeners that a URL has been found. 26 // Notify all registered listeners that a URL has been found.
26 void NotifyOnFound(const std::string& url); 27 void NotifyOnFound(const GURL& url);
27 28
28 // Notify all registered listeners that a URL has been lost. 29 // Notify all registered listeners that a URL has been lost.
29 void NotifyOnLost(const std::string& url); 30 void NotifyOnLost(const GURL& url);
30 31
31 // Notify all registered listeners that a distance has changed for a URL. 32 // Notify all registered listeners that a distance has changed for a URL.
32 void NotifyOnDistanceChanged(const std::string& url, 33 void NotifyOnDistanceChanged(const GURL& url,
33 double distance_estimate); 34 double distance_estimate);
34 35
35 private: 36 private:
36 base::ObserverList<PhysicalWebListener> observer_list_; 37 base::ObserverList<PhysicalWebListener> observer_list_;
37 }; 38 };
38 39
39 } // namespace physical_web 40 } // namespace physical_web
40 41
41 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_ 42 #endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698