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 EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ |
6 #define EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ | 6 #define EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 void Work() override; | 233 void Work() override; |
234 | 234 |
235 private: | 235 private: |
236 int socket_id_; | 236 int socket_id_; |
237 }; | 237 }; |
238 | 238 |
239 class SocketBindFunction : public SocketAsyncApiFunction { | 239 class SocketBindFunction : public SocketAsyncApiFunction { |
240 public: | 240 public: |
241 DECLARE_EXTENSION_FUNCTION("socket.bind", SOCKET_BIND) | 241 DECLARE_EXTENSION_FUNCTION("socket.bind", SOCKET_BIND) |
242 | 242 |
| 243 SocketBindFunction(); |
| 244 |
243 protected: | 245 protected: |
244 ~SocketBindFunction() override {} | 246 ~SocketBindFunction() override {} |
245 | 247 |
246 // AsyncApiFunction: | 248 // AsyncApiFunction: |
247 bool Prepare() override; | 249 bool Prepare() override; |
248 void AsyncWorkStart() override; | 250 void AsyncWorkStart() override; |
249 | 251 |
250 private: | 252 private: |
251 int socket_id_; | 253 int socket_id_; |
252 std::string address_; | 254 std::string address_; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 548 |
547 scoped_ptr<api::socket::Secure::Params> params_; | 549 scoped_ptr<api::socket::Secure::Params> params_; |
548 scoped_refptr<net::URLRequestContextGetter> url_request_getter_; | 550 scoped_refptr<net::URLRequestContextGetter> url_request_getter_; |
549 | 551 |
550 DISALLOW_COPY_AND_ASSIGN(SocketSecureFunction); | 552 DISALLOW_COPY_AND_ASSIGN(SocketSecureFunction); |
551 }; | 553 }; |
552 | 554 |
553 } // namespace extensions | 555 } // namespace extensions |
554 | 556 |
555 #endif // EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ | 557 #endif // EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ |
OLD | NEW |