OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MDNS_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MDNS_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MDNS_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MDNS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class ServiceDiscoveryClientMdns | 22 class ServiceDiscoveryClientMdns |
23 : public ServiceDiscoverySharedClient, | 23 : public ServiceDiscoverySharedClient, |
24 public net::NetworkChangeNotifier::NetworkChangeObserver { | 24 public net::NetworkChangeNotifier::NetworkChangeObserver { |
25 public: | 25 public: |
26 class Proxy; | 26 class Proxy; |
27 ServiceDiscoveryClientMdns(); | 27 ServiceDiscoveryClientMdns(); |
28 | 28 |
29 // ServiceDiscoveryClient implementation. | 29 // ServiceDiscoveryClient implementation. |
30 virtual scoped_ptr<ServiceWatcher> CreateServiceWatcher( | 30 virtual scoped_ptr<ServiceWatcher> CreateServiceWatcher( |
31 const std::string& service_type, | 31 const std::string& service_type, |
32 const ServiceWatcher::UpdatedCallback& callback) OVERRIDE; | 32 const ServiceWatcher::UpdatedCallback& callback) override; |
33 virtual scoped_ptr<ServiceResolver> CreateServiceResolver( | 33 virtual scoped_ptr<ServiceResolver> CreateServiceResolver( |
34 const std::string& service_name, | 34 const std::string& service_name, |
35 const ServiceResolver::ResolveCompleteCallback& callback) OVERRIDE; | 35 const ServiceResolver::ResolveCompleteCallback& callback) override; |
36 virtual scoped_ptr<LocalDomainResolver> CreateLocalDomainResolver( | 36 virtual scoped_ptr<LocalDomainResolver> CreateLocalDomainResolver( |
37 const std::string& domain, | 37 const std::string& domain, |
38 net::AddressFamily address_family, | 38 net::AddressFamily address_family, |
39 const LocalDomainResolver::IPAddressCallback& callback) OVERRIDE; | 39 const LocalDomainResolver::IPAddressCallback& callback) override; |
40 | 40 |
41 // net::NetworkChangeNotifier::NetworkChangeObserver implementation. | 41 // net::NetworkChangeNotifier::NetworkChangeObserver implementation. |
42 virtual void OnNetworkChanged( | 42 virtual void OnNetworkChanged( |
43 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; | 43 net::NetworkChangeNotifier::ConnectionType type) override; |
44 | 44 |
45 private: | 45 private: |
46 virtual ~ServiceDiscoveryClientMdns(); | 46 virtual ~ServiceDiscoveryClientMdns(); |
47 | 47 |
48 void ScheduleStartNewClient(); | 48 void ScheduleStartNewClient(); |
49 void StartNewClient(); | 49 void StartNewClient(); |
50 void OnInterfaceListReady(const net::InterfaceIndexFamilyList& interfaces); | 50 void OnInterfaceListReady(const net::InterfaceIndexFamilyList& interfaces); |
51 void OnMdnsInitialized(bool success); | 51 void OnMdnsInitialized(bool success); |
52 void ReportSuccess(); | 52 void ReportSuccess(); |
53 void InvalidateWeakPtrs(); | 53 void InvalidateWeakPtrs(); |
(...skipping 18 matching lines...) Expand all Loading... |
72 bool need_dalay_mdns_tasks_; | 72 bool need_dalay_mdns_tasks_; |
73 | 73 |
74 base::WeakPtrFactory<ServiceDiscoveryClientMdns> weak_ptr_factory_; | 74 base::WeakPtrFactory<ServiceDiscoveryClientMdns> weak_ptr_factory_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(ServiceDiscoveryClientMdns); | 76 DISALLOW_COPY_AND_ASSIGN(ServiceDiscoveryClientMdns); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace local_discovery | 79 } // namespace local_discovery |
80 | 80 |
81 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MDNS_H_ | 81 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MDNS_H_ |
OLD | NEW |