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

Side by Side Diff: chrome/browser/extensions/api/mdns/dns_sd_device_lister.h

Issue 2876703002: [mDns] Move dns_sd_registry from extension/api/mdns to media/router/discovery/mdns (Closed)
Patch Set: rebase with master Created 3 years, 7 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_DEVICE_LISTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_DEVICE_LISTER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "chrome/browser/extensions/api/mdns/dns_sd_delegate.h"
12 #include "chrome/browser/local_discovery/service_discovery_device_lister.h"
13
14 namespace local_discovery {
15 class ServiceDiscoveryClient;
16 } // local_discovery
17
18 namespace extensions {
19
20 // Manages a watcher for a specific MDNS/DNS-SD service type and notifies
21 // a delegate of changes to watched services.
22 class DnsSdDeviceLister
23 : public local_discovery::ServiceDiscoveryDeviceLister::Delegate {
24 public:
25 DnsSdDeviceLister(
26 local_discovery::ServiceDiscoveryClient* service_discovery_client,
27 DnsSdDelegate* delegate,
28 const std::string& service_type);
29 virtual ~DnsSdDeviceLister();
30
31 virtual void Discover(bool force_update);
32
33 protected:
34 void OnDeviceChanged(
35 bool added,
36 const local_discovery::ServiceDescription& service_description) override;
37 void OnDeviceRemoved(const std::string& service_name) override;
38 void OnDeviceCacheFlushed() override;
39
40 private:
41 // The delegate to notify of changes to services.
42 DnsSdDelegate* const delegate_;
43 local_discovery::ServiceDiscoveryDeviceLister device_lister_;
44 bool started_;
45
46 DISALLOW_COPY_AND_ASSIGN(DnsSdDeviceLister);
47 };
48
49 } // namespace extensions
50
51 #endif // CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_DEVICE_LISTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/mdns/dns_sd_delegate.cc ('k') | chrome/browser/extensions/api/mdns/dns_sd_device_lister.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698