| 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_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_MESSAGE_HANDLER_H_ | 6 #define CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_MESSAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
| 12 #include "chrome/common/local_discovery/service_discovery_client.h" | 12 #include "chrome/common/local_discovery/service_discovery_client.h" |
| 13 #include "chrome/utility/utility_message_handler.h" | 13 #include "chrome/utility/utility_message_handler.h" |
| 14 | 14 |
| 15 struct LocalDiscoveryMsg_SocketInfo; | 15 struct LocalDiscoveryMsg_SocketInfo; |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 class IPAddress; |
| 18 class MDnsClient; | 19 class MDnsClient; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace base { | 22 namespace base { |
| 22 struct FileDescriptor; | 23 struct FileDescriptor; |
| 23 class TaskRunner; | 24 class TaskRunner; |
| 24 class Thread; | 25 class Thread; |
| 25 } | 26 } |
| 26 | 27 |
| 27 namespace tracked_objects { | 28 namespace tracked_objects { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 const std::string& name); | 89 const std::string& name); |
| 89 | 90 |
| 90 // Is called by ServiceResolver as callback. | 91 // Is called by ServiceResolver as callback. |
| 91 void OnServiceResolved(uint64 id, | 92 void OnServiceResolved(uint64 id, |
| 92 ServiceResolver::RequestStatus status, | 93 ServiceResolver::RequestStatus status, |
| 93 const ServiceDescription& description); | 94 const ServiceDescription& description); |
| 94 | 95 |
| 95 // Is called by LocalDomainResolver as callback. | 96 // Is called by LocalDomainResolver as callback. |
| 96 void OnLocalDomainResolved(uint64 id, | 97 void OnLocalDomainResolved(uint64 id, |
| 97 bool success, | 98 bool success, |
| 98 const net::IPAddressNumber& address_ipv4, | 99 const net::IPAddress& address_ipv4, |
| 99 const net::IPAddressNumber& address_ipv6); | 100 const net::IPAddress& address_ipv6); |
| 100 | 101 |
| 101 void Send(IPC::Message* msg); | 102 void Send(IPC::Message* msg); |
| 102 | 103 |
| 103 ServiceWatchers service_watchers_; | 104 ServiceWatchers service_watchers_; |
| 104 ServiceResolvers service_resolvers_; | 105 ServiceResolvers service_resolvers_; |
| 105 LocalDomainResolvers local_domain_resolvers_; | 106 LocalDomainResolvers local_domain_resolvers_; |
| 106 | 107 |
| 107 scoped_ptr<net::MDnsClient> mdns_client_; | 108 scoped_ptr<net::MDnsClient> mdns_client_; |
| 108 scoped_ptr<ServiceDiscoveryClient> service_discovery_client_; | 109 scoped_ptr<ServiceDiscoveryClient> service_discovery_client_; |
| 109 | 110 |
| 110 scoped_refptr<base::TaskRunner> utility_task_runner_; | 111 scoped_refptr<base::TaskRunner> utility_task_runner_; |
| 111 scoped_refptr<base::TaskRunner> discovery_task_runner_; | 112 scoped_refptr<base::TaskRunner> discovery_task_runner_; |
| 112 scoped_ptr<base::Thread> discovery_thread_; | 113 scoped_ptr<base::Thread> discovery_thread_; |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace local_discovery | 116 } // namespace local_discovery |
| 116 | 117 |
| 117 #endif // CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_MESSAGE_HANDLER_H_ | 118 #endif // CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_MESSAGE_HANDLER_H_ |
| OLD | NEW |