| 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_SOCKETS_UDP_SOCKETS_UDP_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SOCKETS_UDP_SOCKETS_UDP_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_SOCKETS_UDP_SOCKETS_UDP_API_H_ | 6 #define EXTENSIONS_BROWSER_API_SOCKETS_UDP_SOCKETS_UDP_API_H_ |
| 7 | 7 |
| 8 #include "extensions/browser/api/socket/socket_api.h" | 8 #include "extensions/browser/api/socket/socket_api.h" |
| 9 #include "extensions/common/api/sockets_udp.h" | 9 #include "extensions/common/api/sockets_udp.h" |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 public: | 95 public: |
| 96 DECLARE_EXTENSION_FUNCTION("sockets.udp.bind", SOCKETS_UDP_BIND) | 96 DECLARE_EXTENSION_FUNCTION("sockets.udp.bind", SOCKETS_UDP_BIND) |
| 97 | 97 |
| 98 SocketsUdpBindFunction(); | 98 SocketsUdpBindFunction(); |
| 99 | 99 |
| 100 protected: | 100 protected: |
| 101 ~SocketsUdpBindFunction() override; | 101 ~SocketsUdpBindFunction() override; |
| 102 | 102 |
| 103 // AsyncApiFunction: | 103 // AsyncApiFunction: |
| 104 bool Prepare() override; | 104 bool Prepare() override; |
| 105 void Work() override; | 105 void AsyncWorkStart() override; |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 scoped_ptr<sockets_udp::Bind::Params> params_; | 108 scoped_ptr<sockets_udp::Bind::Params> params_; |
| 109 UDPSocketEventDispatcher* socket_event_dispatcher_; | 109 UDPSocketEventDispatcher* socket_event_dispatcher_; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 class SocketsUdpSendFunction : public UDPSocketExtensionWithDnsLookupFunction { | 112 class SocketsUdpSendFunction : public UDPSocketExtensionWithDnsLookupFunction { |
| 113 public: | 113 public: |
| 114 DECLARE_EXTENSION_FUNCTION("sockets.udp.send", SOCKETS_UDP_SEND) | 114 DECLARE_EXTENSION_FUNCTION("sockets.udp.send", SOCKETS_UDP_SEND) |
| 115 | 115 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 void Work() override; | 270 void Work() override; |
| 271 | 271 |
| 272 private: | 272 private: |
| 273 scoped_ptr<sockets_udp::GetJoinedGroups::Params> params_; | 273 scoped_ptr<sockets_udp::GetJoinedGroups::Params> params_; |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 } // namespace core_api | 276 } // namespace core_api |
| 277 } // namespace extensions | 277 } // namespace extensions |
| 278 | 278 |
| 279 #endif // EXTENSIONS_BROWSER_API_SOCKETS_UDP_SOCKETS_UDP_API_H_ | 279 #endif // EXTENSIONS_BROWSER_API_SOCKETS_UDP_SOCKETS_UDP_API_H_ |
| OLD | NEW |