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

Side by Side Diff: trunk/src/chrome/browser/extensions/api/mdns/dns_sd_registry.h

Issue 23945003: Revert 221619 "Initial chrome.mdns API." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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_REGISTRY_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/observer_list.h"
12
13 namespace extensions {
14
15 // Network Service Discovery registry class for keeping track of discovered
16 // network services.
17 class DnsSdRegistry {
18 public:
19 typedef std::vector<std::string> DnsSdServiceList;
20
21 class DnsSdObserver {
22 public:
23 virtual void OnDnsSdEvent(const std::string& service_type,
24 const DnsSdServiceList& services) = 0;
25
26 protected:
27 virtual ~DnsSdObserver() {}
28 };
29
30 explicit DnsSdRegistry();
31 virtual ~DnsSdRegistry();
32
33 // Observer registration for parties interested in discovery events.
34 virtual void AddObserver(DnsSdObserver* observer);
35 virtual void RemoveObserver(DnsSdObserver* observer);
36
37 // DNS-SD-related discovery functionality.
38 virtual void RegisterDnsSdListener(std::string service_type);
39 virtual void UnregisterDnsSdListener(std::string service_type);
40
41 protected:
42 ObserverList<DnsSdObserver> observers_;
43 };
44
45 } // namespace extensions
46
47 #endif // CHROME_BROWSER_EXTENSIONS_API_MDNS_DNS_SD_REGISTRY_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/extensions/api/mdns/OWNERS ('k') | trunk/src/chrome/browser/extensions/api/mdns/dns_sd_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698