| 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_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MAC_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MAC_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MAC_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MAC_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include <memory> |
| 9 #include <string> | 10 #include <string> |
| 10 | 11 |
| 11 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" | 17 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" |
| 17 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
| 18 | 19 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 const ServiceWatcher::UpdatedCallback& callback, | 101 const ServiceWatcher::UpdatedCallback& callback, |
| 101 scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner); | 102 scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner); |
| 102 | 103 |
| 103 void OnServicesUpdate(ServiceWatcher::UpdateType update, | 104 void OnServicesUpdate(ServiceWatcher::UpdateType update, |
| 104 const std::string& service); | 105 const std::string& service); |
| 105 | 106 |
| 106 private: | 107 private: |
| 107 ~ServiceWatcherImplMac() override; | 108 ~ServiceWatcherImplMac() override; |
| 108 | 109 |
| 109 void Start() override; | 110 void Start() override; |
| 110 void DiscoverNewServices(bool force_update) override; | 111 void DiscoverNewServices() override; |
| 111 void SetActivelyRefreshServices(bool actively_refresh_services) override; | 112 void SetActivelyRefreshServices(bool actively_refresh_services) override; |
| 112 std::string GetServiceType() const override; | 113 std::string GetServiceType() const override; |
| 113 | 114 |
| 114 std::string service_type_; | 115 std::string service_type_; |
| 115 ServiceWatcher::UpdatedCallback callback_; | 116 ServiceWatcher::UpdatedCallback callback_; |
| 116 bool started_; | 117 bool started_; |
| 117 | 118 |
| 118 std::unique_ptr<NetServiceBrowserContainer, | 119 std::unique_ptr<NetServiceBrowserContainer, |
| 119 ServiceDiscoveryThreadDeleter<NetServiceBrowserContainer>> | 120 ServiceDiscoveryThreadDeleter<NetServiceBrowserContainer>> |
| 120 container_; | 121 container_; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ServiceDiscoveryThreadDeleter<NetServiceContainer>> | 188 ServiceDiscoveryThreadDeleter<NetServiceContainer>> |
| 188 container_; | 189 container_; |
| 189 base::WeakPtrFactory<ServiceResolverImplMac> weak_factory_; | 190 base::WeakPtrFactory<ServiceResolverImplMac> weak_factory_; |
| 190 | 191 |
| 191 DISALLOW_COPY_AND_ASSIGN(ServiceResolverImplMac); | 192 DISALLOW_COPY_AND_ASSIGN(ServiceResolverImplMac); |
| 192 }; | 193 }; |
| 193 | 194 |
| 194 } // namespace local_discovery | 195 } // namespace local_discovery |
| 195 | 196 |
| 196 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MAC_H_ | 197 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_MAC_H_ |
| OLD | NEW |