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

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

Issue 12684008: Multicast socket API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 7 years, 8 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_api.h
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index 34013a4eb8784cc8fd3b1aff63164d00bf54dab7..321a0ac567ef49f1d871cc39532e31c34440fe61 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -349,6 +349,93 @@ class SocketGetNetworkListFunction : public AsyncExtensionFunction {
void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list);
};
+class SocketJoinGroupFunction : public SocketAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("socket.joinGroup", SOCKET_MUILTICAST_JOIN_GROUP)
+
+ SocketJoinGroupFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
+
+ protected:
+ virtual ~SocketJoinGroupFunction();
+
+ // AsyncApiFunction
+ virtual bool Prepare() OVERRIDE;
+ virtual void Work() OVERRIDE;
+
+ private:
+ scoped_ptr<api::socket::JoinGroup::Params> params_;
+};
+
+class SocketLeaveGroupFunction : public SocketAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("socket.leaveGroup", SOCKET_MUILTICAST_LEAVE_GROUP)
+
+ SocketLeaveGroupFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
+
+ protected:
+ virtual ~SocketLeaveGroupFunction();
+
+ // AsyncApiFunction
+ virtual bool Prepare() OVERRIDE;
+ virtual void Work() OVERRIDE;
+
+ private:
+ scoped_ptr<api::socket::LeaveGroup::Params> params_;
+};
+
+class SocketSetMulticastTimeToLiveFunction : public SocketAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("socket.setMulticastTimeToLive",
+ SOCKET_MUILTICAST_SET_TIME_TO_LIVE)
+
+ SocketSetMulticastTimeToLiveFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
+
+ protected:
+ virtual ~SocketSetMulticastTimeToLiveFunction();
+
+ // AsyncApiFunction
+ virtual bool Prepare() OVERRIDE;
+ virtual void Work() OVERRIDE;
+
+ private:
+ scoped_ptr<api::socket::SetMulticastTimeToLive::Params> params_;
+};
+
+class SocketSetMulticastLoopbackModeFunction : public SocketAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("socket.setMulticastLoopbackMode",
+ SOCKET_MUILTICAST_SET_LOOPBACK_MODE)
+
+ SocketSetMulticastLoopbackModeFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
+
+ protected:
+ virtual ~SocketSetMulticastLoopbackModeFunction();
+
+ // AsyncApiFunction
+ virtual bool Prepare() OVERRIDE;
+ virtual void Work() OVERRIDE;
+
+ private:
+ scoped_ptr<api::socket::SetMulticastLoopbackMode::Params> params_;
+};
+
+class SocketGetJoinedGroupsFunction : public SocketAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("socket.getJoinedGroups",
+ SOCKET_MUILTICAST_GET_JOINED_GROUPS)
+
+ SocketGetJoinedGroupsFunction();
mmenke 2013/04/12 21:07:41 2 space indent.
Bei Zhang 2013/04/15 22:30:26 Done.
+
+ protected:
+ virtual ~SocketGetJoinedGroupsFunction();
+
+ // AsyncApiFunction
+ virtual bool Prepare() OVERRIDE;
+ virtual void Work() OVERRIDE;
+
+ private:
+ scoped_ptr<api::socket::GetJoinedGroups::Params> params_;
+};
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_SOCKET_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/socket/socket_api.cc » ('j') | chrome/browser/extensions/api/socket/socket_api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698