Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / local_discovery / privet_device_resolver.h
blob8e82bf9034d8fa0c89518c2c512142f323fbc899
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "chrome/browser/local_discovery/device_description.h"
12 #include "chrome/common/local_discovery/service_discovery_client.h"
14 namespace local_discovery {
16 class PrivetDeviceResolver {
17 public:
18 typedef base::Callback<void(bool /*success*/,
19 const DeviceDescription& /*description*/)>
20 ResultCallback;
22 PrivetDeviceResolver(
23 ServiceDiscoveryClient* service_discovery_client,
24 const std::string& service_name,
25 const ResultCallback& callback);
26 ~PrivetDeviceResolver();
28 void Start();
30 private:
31 void OnServiceResolved(
32 ServiceResolver::RequestStatus request_status,
33 const ServiceDescription& service_description);
36 ServiceDiscoveryClient* service_discovery_client_;
37 scoped_ptr<ServiceResolver> service_resolver_;
38 std::string service_name_;
39 ResultCallback callback_;
42 } // namespace local_discovery
44 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_