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 GcdPrivateEstablishSessionFunction : public ChromeAsyncExtensionFunction { | |
127 public: | |
128 DECLARE_EXTENSION_FUNCTION("gcdPrivate.establishSession", | |
129 GCDPRIVATE_ESTABLISHSESSION) | |
130 | |
131 GcdPrivateEstablishSessionFunction(); | |
132 | |
133 protected: | |
134 ~GcdPrivateEstablishSessionFunction() 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 std::vector<api::gcd_private::PairingType>& pairing_types); | |
144 }; | |
145 | |
146 class GcdPrivateCreateSessionFunction : public ChromeAsyncExtensionFunction { | 126 class GcdPrivateCreateSessionFunction : public ChromeAsyncExtensionFunction { |
147 public: | 127 public: |
148 DECLARE_EXTENSION_FUNCTION("gcdPrivate.createSession", | 128 DECLARE_EXTENSION_FUNCTION("gcdPrivate.createSession", |
149 GCDPRIVATE_ESTABLISHSESSION) | 129 GCDPRIVATE_ESTABLISHSESSION) |
150 | 130 |
151 GcdPrivateCreateSessionFunction(); | 131 GcdPrivateCreateSessionFunction(); |
152 | 132 |
153 protected: | 133 protected: |
154 ~GcdPrivateCreateSessionFunction() override; | 134 ~GcdPrivateCreateSessionFunction() override; |
155 | 135 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 282 |
303 // AsyncExtensionFunction overrides. | 283 // AsyncExtensionFunction overrides. |
304 bool RunAsync() override; | 284 bool RunAsync() override; |
305 | 285 |
306 private: | 286 private: |
307 }; | 287 }; |
308 | 288 |
309 } // namespace extensions | 289 } // namespace extensions |
310 | 290 |
311 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 291 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
OLD | NEW |