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

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

Issue 8896013: Implement onEvent callback framework for UDP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put back the bracket. Created 9 years 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_controller.h
diff --git a/chrome/browser/extensions/api/socket/socket_api_controller.h b/chrome/browser/extensions/api/socket/socket_api_controller.h
index ff50bc0b6e9accb0c28644259c7ee49f15b4a3c5..d2ae2633c2b3b4c61d61235aad0225e0c6fb1e92 100644
--- a/chrome/browser/extensions/api/socket/socket_api_controller.h
+++ b/chrome/browser/extensions/api/socket/socket_api_controller.h
@@ -28,6 +28,11 @@ class IPEndPoint;
namespace extensions {
+// kSrcIdKey, or "srcId," binds a socket to the onEvent closure that was
+// optionally passed to the socket.create() method. It's generated by us in
+// schema_generated_bindings.js; the application code is unaware of it.
+extern const char kSrcIdKey[];
+
class Socket;
// SocketController keeps track of a collection of Sockets and provides a
@@ -43,7 +48,7 @@ class SocketController {
// TODO(miket): aa's suggestion to track lifetime of callbacks associated
// with each socket, which will then let us clean up when we go out of scope
// rather than requiring that the app developer remember to call Destroy.
- int CreateUdp(const Profile* profile, const std::string& extension_id,
+ int CreateUdp(Profile* profile, const std::string& extension_id, int src_id,
const GURL& src_url);
bool DestroyUdp(int socket_id);
« no previous file with comments | « chrome/browser/extensions/api/socket/socket_api.cc ('k') | chrome/browser/extensions/api/socket/socket_api_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698