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

Unified Diff: chrome/common/extensions/api/experimental.socket.idl

Issue 10273016: Refactor the socket API to remove onEvent callback in socket.create() function. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update Created 8 years, 7 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
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/experimental.socket_custom_bindings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/experimental.socket.idl
diff --git a/chrome/common/extensions/api/experimental.socket.idl b/chrome/common/extensions/api/experimental.socket.idl
index 85a8417a2bd81a49e25afb54a6b1c7ecf93ab1d5..0e77600d08beac26b03f6a32a175d555acc63d4d 100644
--- a/chrome/common/extensions/api/experimental.socket.idl
+++ b/chrome/common/extensions/api/experimental.socket.idl
@@ -5,39 +5,11 @@
// File-level comment to appease parser. Eventually this will not be necessary.
[nodoc] namespace experimental.socket {
-
- // A socket event.
- dictionary SocketEvent {
- // A connectComplete event reports the result of a connect that blocked. A
- // writeComplete event reports the result of a write that blocked. A
- // dataRead event reports bytes that have arrived following a read call
- // that blocked.
- DOMString type;
-
- // The result code, if the event type is dataRead or writeComplete. The
- // result code description matches the resultCode field in the immediate
- // callback for the call that led to this event.
- long? resultCode;
-
- // The data read, if the event type is dataRead.
- // TODO(miket): [instanceOf=ArrayBuffer]object? data;
- long[]? data;
-
- // Whether this is the final event that this socket will send.
- [nodoc] boolean isFinalEvent;
-
- // An ID unique to the calling function's context so that events can get
- // routed back to the correct callback.
- [nodoc] long? srcId;
- };
-
- callback OnEventCallback = void (SocketEvent event);
-
// The socket options.
dictionary CreateOptions {
- // This function is called with events that occur during the lifetime of
- // the socket.
- OnEventCallback? onEvent;
+ // The schema generator does not support dictionaries without any fields.
+ // Ignore this field.
+ [nodoc] long? dummyValue;
};
dictionary CreateInfo {
@@ -171,10 +143,4 @@
SendToCallback callback);
};
- interface Events {
- // Used to pass events back to the socket creator.
- // |event| : The event indicating socket status.
- static void onEvent(SocketEvent event);
- };
-
};
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/experimental.socket_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698