OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 DnsSdServiceTypeDataMap; | 84 DnsSdServiceTypeDataMap; |
85 | 85 |
86 virtual DnsSdDeviceLister* CreateDnsSdDeviceLister( | 86 virtual DnsSdDeviceLister* CreateDnsSdDeviceLister( |
87 DnsSdDelegate* delegate, | 87 DnsSdDelegate* delegate, |
88 const std::string& service_type, | 88 const std::string& service_type, |
89 local_discovery::ServiceDiscoverySharedClient* discovery_client); | 89 local_discovery::ServiceDiscoverySharedClient* discovery_client); |
90 | 90 |
91 // DnsSdDelegate implementation: | 91 // DnsSdDelegate implementation: |
92 virtual void ServiceChanged(const std::string& service_type, | 92 virtual void ServiceChanged(const std::string& service_type, |
93 bool added, | 93 bool added, |
94 const DnsSdService& service) OVERRIDE; | 94 const DnsSdService& service) override; |
95 virtual void ServiceRemoved(const std::string& service_type, | 95 virtual void ServiceRemoved(const std::string& service_type, |
96 const std::string& service_name) OVERRIDE; | 96 const std::string& service_name) override; |
97 virtual void ServicesFlushed(const std::string& service_type) OVERRIDE; | 97 virtual void ServicesFlushed(const std::string& service_type) override; |
98 | 98 |
99 DnsSdServiceTypeDataMap service_data_map_; | 99 DnsSdServiceTypeDataMap service_data_map_; |
100 | 100 |
101 private: | 101 private: |
102 void DispatchApiEvent(const std::string& service_type); | 102 void DispatchApiEvent(const std::string& service_type); |
103 bool IsRegistered(const std::string& service_type); | 103 bool IsRegistered(const std::string& service_type); |
104 | 104 |
105 scoped_refptr<local_discovery::ServiceDiscoverySharedClient> | 105 scoped_refptr<local_discovery::ServiceDiscoverySharedClient> |
106 service_discovery_client_; | 106 service_discovery_client_; |
107 ObserverList<DnsSdObserver> observers_; | 107 ObserverList<DnsSdObserver> observers_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(DnsSdRegistry); | 109 DISALLOW_COPY_AND_ASSIGN(DnsSdRegistry); |
110 }; | 110 }; |
111 | 111 |
112 } // namespace extensions | 112 } // namespace extensions |
113 | 113 |
114 #endif // CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_ | 114 #endif // CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_ |
OLD | NEW |