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

Side by Side Diff: chrome/browser/extensions/api/dial/dial_api.h

Issue 2750453002: Add DiscoveryNetworkMonitor implementation (Closed)
Patch Set: Created 3 years, 9 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EXTENSIONS_API_DIAL_DIAL_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/extensions/api/dial/dial_device_data.h" 11 #include "chrome/browser/extensions/api/dial/dial_device_data.h"
12 #include "chrome/browser/extensions/api/dial/dial_registry.h" 12 #include "chrome/browser/extensions/api/dial/dial_registry.h"
13 #include "chrome/browser/net/discovery_network_monitor.h"
13 #include "chrome/common/extensions/api/dial.h" 14 #include "chrome/common/extensions/api/dial.h"
14 #include "components/keyed_service/core/refcounted_keyed_service.h" 15 #include "components/keyed_service/core/refcounted_keyed_service.h"
15 #include "extensions/browser/api/async_api_function.h" 16 #include "extensions/browser/api/async_api_function.h"
16 #include "extensions/browser/event_router.h" 17 #include "extensions/browser/event_router.h"
17 18
18 namespace extensions { 19 namespace extensions {
19 20
20 namespace api { 21 namespace api {
21 namespace dial { 22 namespace dial {
22 class DeviceDescriptionFetcher; 23 class DeviceDescriptionFetcher;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 std::unique_ptr<api::dial::FetchDeviceDescription::Params> params_; 152 std::unique_ptr<api::dial::FetchDeviceDescription::Params> params_;
152 std::unique_ptr<api::dial::DeviceDescriptionFetcher> 153 std::unique_ptr<api::dial::DeviceDescriptionFetcher>
153 device_description_fetcher_; 154 device_description_fetcher_;
154 155
155 DialAPI* dial_; 156 DialAPI* dial_;
156 157
157 DISALLOW_COPY_AND_ASSIGN(DialFetchDeviceDescriptionFunction); 158 DISALLOW_COPY_AND_ASSIGN(DialFetchDeviceDescriptionFunction);
158 }; 159 };
159 160
161 class DialGetNetworkIdFunction : public AsyncExtensionFunction {
imcheng 2017/03/14 22:45:34 Mark - I don't believe we need this anymore. The n
mark a. foltz 2017/03/18 19:58:21 It's up to you - if we add this, we could test it
btolsch 2017/04/03 10:16:35 I removee it since it sounds like it would only be
162 public:
163 DialGetNetworkIdFunction();
164
165 protected:
166 ~DialGetNetworkIdFunction() override;
167
168 // AsyncExtensionFunction:
169 bool RunAsync() override;
170
171 private:
172 DECLARE_EXTENSION_FUNCTION("dial.getNetworkId", DIAL_GETNETWORKID)
173
174 void GetNetworkIdOnIOThread();
175 void NetworkIdCallback();
176
177 DISALLOW_COPY_AND_ASSIGN(DialGetNetworkIdFunction);
178 };
179
160 } // namespace extensions 180 } // namespace extensions
161 181
162 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_ 182 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698