OLD | NEW |
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_SOCKET_SOCKET_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "chrome/browser/extensions/api/api_function.h" | 9 #include "chrome/browser/extensions/api/api_function.h" |
10 #include "chrome/browser/extensions/api/api_resource_manager.h" | 10 #include "chrome/browser/extensions/api/api_resource_manager.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 virtual ~SocketSetNoDelayFunction(); | 272 virtual ~SocketSetNoDelayFunction(); |
273 | 273 |
274 // AsyncApiFunction: | 274 // AsyncApiFunction: |
275 virtual bool Prepare() OVERRIDE; | 275 virtual bool Prepare() OVERRIDE; |
276 virtual void Work() OVERRIDE; | 276 virtual void Work() OVERRIDE; |
277 | 277 |
278 private: | 278 private: |
279 scoped_ptr<api::experimental_socket::SetNoDelay::Params> params_; | 279 scoped_ptr<api::experimental_socket::SetNoDelay::Params> params_; |
280 }; | 280 }; |
281 | 281 |
| 282 class SocketGetInfoFunction : public SocketAsyncApiFunction { |
| 283 public: |
| 284 DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.getInfo"); |
| 285 |
| 286 SocketGetInfoFunction(); |
| 287 |
| 288 protected: |
| 289 virtual ~SocketGetInfoFunction(); |
| 290 |
| 291 // AsyncApiFunction: |
| 292 virtual bool Prepare() OVERRIDE; |
| 293 virtual void Work() OVERRIDE; |
| 294 |
| 295 private: |
| 296 scoped_ptr<api::experimental_socket::GetInfo::Params> params_; |
| 297 }; |
| 298 |
282 } // namespace extensions | 299 } // namespace extensions |
283 | 300 |
284 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ | 301 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_ |
OLD | NEW |