| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 private: | 400 private: |
| 401 scoped_ptr<core_api::socket::GetInfo::Params> params_; | 401 scoped_ptr<core_api::socket::GetInfo::Params> params_; |
| 402 }; | 402 }; |
| 403 | 403 |
| 404 class SocketGetNetworkListFunction : public AsyncExtensionFunction { | 404 class SocketGetNetworkListFunction : public AsyncExtensionFunction { |
| 405 public: | 405 public: |
| 406 DECLARE_EXTENSION_FUNCTION("socket.getNetworkList", SOCKET_GETNETWORKLIST) | 406 DECLARE_EXTENSION_FUNCTION("socket.getNetworkList", SOCKET_GETNETWORKLIST) |
| 407 | 407 |
| 408 protected: | 408 protected: |
| 409 virtual ~SocketGetNetworkListFunction() {} | 409 virtual ~SocketGetNetworkListFunction() {} |
| 410 virtual bool RunImpl() OVERRIDE; | 410 virtual bool RunAsync() OVERRIDE; |
| 411 | 411 |
| 412 private: | 412 private: |
| 413 void GetNetworkListOnFileThread(); | 413 void GetNetworkListOnFileThread(); |
| 414 void HandleGetNetworkListError(); | 414 void HandleGetNetworkListError(); |
| 415 void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list); | 415 void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list); |
| 416 }; | 416 }; |
| 417 | 417 |
| 418 class SocketJoinGroupFunction : public SocketAsyncApiFunction { | 418 class SocketJoinGroupFunction : public SocketAsyncApiFunction { |
| 419 public: | 419 public: |
| 420 DECLARE_EXTENSION_FUNCTION("socket.joinGroup", SOCKET_MULTICAST_JOIN_GROUP) | 420 DECLARE_EXTENSION_FUNCTION("socket.joinGroup", SOCKET_MULTICAST_JOIN_GROUP) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 // AsyncApiFunction | 498 // AsyncApiFunction |
| 499 virtual bool Prepare() OVERRIDE; | 499 virtual bool Prepare() OVERRIDE; |
| 500 virtual void Work() OVERRIDE; | 500 virtual void Work() OVERRIDE; |
| 501 | 501 |
| 502 private: | 502 private: |
| 503 scoped_ptr<core_api::socket::GetJoinedGroups::Params> params_; | 503 scoped_ptr<core_api::socket::GetJoinedGroups::Params> params_; |
| 504 }; | 504 }; |
| 505 } // namespace extensions | 505 } // namespace extensions |
| 506 | 506 |
| 507 #endif // EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ | 507 #endif // EXTENSIONS_BROWSER_API_SOCKET_SOCKET_API_H_ |
| OLD | NEW |