Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1657)

Unified Diff: chrome/browser/extensions/api/socket/socket.h

Issue 10790137: Adds socket.getInfo to the socket API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adds tests Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/socket/socket.h
diff --git a/chrome/browser/extensions/api/socket/socket.h b/chrome/browser/extensions/api/socket/socket.h
index 663a944e3636d2821e675536a7dfea97be38808c..a91a45044b34f1d2eb81bd37dc2efbeb5ac0385d 100644
--- a/chrome/browser/extensions/api/socket/socket.h
+++ b/chrome/browser/extensions/api/socket/socket.h
@@ -14,6 +14,7 @@
#include "chrome/browser/extensions/api/api_resource.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
+#include "net/base/ip_endpoint.h"
namespace net {
class AddressList;
@@ -63,6 +64,12 @@ class Socket : public ApiResource {
virtual bool SetKeepAlive(bool enable, int delay);
virtual bool SetNoDelay(bool no_delay);
+ bool IsConnected();
+ virtual bool IsTCPSocket() = 0;
+
+ virtual bool GetPeerAddress(net::IPEndPoint* address) = 0;
+ virtual bool GetLocalAddress(net::IPEndPoint* address) = 0;
+
static bool StringAndPortToAddressList(const std::string& ip_address_str,
int port,
net::AddressList* address_list);
« no previous file with comments | « no previous file | chrome/browser/extensions/api/socket/socket.cc » ('j') | chrome/common/extensions/api/experimental_socket.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698