OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
10 #include "chrome/browser/local_discovery/cloud_device_list_delegate.h" | 10 #include "chrome/browser/local_discovery/cloud_device_list_delegate.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 GcdPrivateGetPrefetchedWifiNameListFunction(); | 117 GcdPrivateGetPrefetchedWifiNameListFunction(); |
118 | 118 |
119 protected: | 119 protected: |
120 ~GcdPrivateGetPrefetchedWifiNameListFunction() override; | 120 ~GcdPrivateGetPrefetchedWifiNameListFunction() override; |
121 | 121 |
122 // SyncExtensionFunction overrides. | 122 // SyncExtensionFunction overrides. |
123 bool RunSync() override; | 123 bool RunSync() override; |
124 }; | 124 }; |
125 | 125 |
| 126 class GcdPrivateGetDeviceInfoFunction : public ChromeAsyncExtensionFunction { |
| 127 public: |
| 128 DECLARE_EXTENSION_FUNCTION("gcdPrivate.getDeviceInfo", |
| 129 GCDPRIVATE_GETDEVICEINFO) |
| 130 |
| 131 GcdPrivateGetDeviceInfoFunction(); |
| 132 |
| 133 protected: |
| 134 ~GcdPrivateGetDeviceInfoFunction() override; |
| 135 |
| 136 // AsyncExtensionFunction overrides. |
| 137 bool RunAsync() override; |
| 138 |
| 139 private: |
| 140 void OnSessionInitialized( |
| 141 int session_id, |
| 142 api::gcd_private::Status status, |
| 143 const base::DictionaryValue& info); |
| 144 }; |
| 145 |
126 class GcdPrivateCreateSessionFunction : public ChromeAsyncExtensionFunction { | 146 class GcdPrivateCreateSessionFunction : public ChromeAsyncExtensionFunction { |
127 public: | 147 public: |
128 DECLARE_EXTENSION_FUNCTION("gcdPrivate.createSession", | 148 DECLARE_EXTENSION_FUNCTION("gcdPrivate.createSession", |
129 GCDPRIVATE_ESTABLISHSESSION) | 149 GCDPRIVATE_ESTABLISHSESSION) |
130 | 150 |
131 GcdPrivateCreateSessionFunction(); | 151 GcdPrivateCreateSessionFunction(); |
132 | 152 |
133 protected: | 153 protected: |
134 ~GcdPrivateCreateSessionFunction() override; | 154 ~GcdPrivateCreateSessionFunction() override; |
135 | 155 |
136 // AsyncExtensionFunction overrides. | 156 // AsyncExtensionFunction overrides. |
137 bool RunAsync() override; | 157 bool RunAsync() override; |
138 | 158 |
139 private: | 159 private: |
140 void OnSessionInitialized( | 160 void OnSessionInitialized( |
141 int session_id, | 161 int session_id, |
142 api::gcd_private::Status status, | 162 api::gcd_private::Status status, |
143 const std::vector<api::gcd_private::PairingType>& pairing_types); | 163 const base::DictionaryValue& info); |
144 }; | 164 }; |
145 | 165 |
146 class GcdPrivateStartPairingFunction : public ChromeAsyncExtensionFunction { | 166 class GcdPrivateStartPairingFunction : public ChromeAsyncExtensionFunction { |
147 public: | 167 public: |
148 DECLARE_EXTENSION_FUNCTION("gcdPrivate.startPairing", GCDPRIVATE_STARTPAIRING) | 168 DECLARE_EXTENSION_FUNCTION("gcdPrivate.startPairing", GCDPRIVATE_STARTPAIRING) |
149 | 169 |
150 GcdPrivateStartPairingFunction(); | 170 GcdPrivateStartPairingFunction(); |
151 | 171 |
152 protected: | 172 protected: |
153 ~GcdPrivateStartPairingFunction() override; | 173 ~GcdPrivateStartPairingFunction() override; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 302 |
283 // AsyncExtensionFunction overrides. | 303 // AsyncExtensionFunction overrides. |
284 bool RunAsync() override; | 304 bool RunAsync() override; |
285 | 305 |
286 private: | 306 private: |
287 }; | 307 }; |
288 | 308 |
289 } // namespace extensions | 309 } // namespace extensions |
290 | 310 |
291 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 311 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
OLD | NEW |