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

Unified Diff: extensions/common/api/copresence_endpoints.idl

Issue 895783002: Remove the Copresence Endpoints API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « extensions/common/api/_api_features.json ('k') | extensions/common/api/schemas.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/api/copresence_endpoints.idl
diff --git a/extensions/common/api/copresence_endpoints.idl b/extensions/common/api/copresence_endpoints.idl
deleted file mode 100644
index b77bde4b8273f5f1ba5c093c8c10e54b66b23872..0000000000000000000000000000000000000000
--- a/extensions/common/api/copresence_endpoints.idl
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Use the <code>chrome.copresenceEndpoints</code> API to create persistent
-// sockets to send data to and receive from data nearby devices.
-namespace copresenceEndpoints {
- // Result of the <code>createEndpoint</code> call.
- [noinline_doc] dictionary EndpointInfo {
- // The ID of the newly created endpoint.
- long endpointId;
-
- // An opaque string containing the locator data for this endpoint. This
- // locator is needed to connect to this endpoint.
- DOMString locator;
- };
-
- // Data from an <code>onReceive</code> event.
- [noinline_doc] dictionary ReceiveInfo {
- // The local endpoint this data is for.
- long localEndpointId;
-
- // The remote endpoint this data came from.
- long remoteEndpointId;
-
- // The data received.
- ArrayBuffer data;
- };
-
- // Status of a socket operation.
- enum EndpointStatus {
- // There was no error in the previous operation.
- no_error,
-
- // The socket was disconnected.
- disconnected,
-
- // The local endpoint id provided is invalid.
- invalid_local_endpoint,
-
- // The remote endpoint id provided is invalid.
- invalid_remote_endpoint,
-
- // There was a failure during connection.
- connect_failure,
-
- // There was an error while trying to send data.
- send_failure,
-
- // There was an error while trying to receive data.
- receive_failure
- };
-
- // Callback from the <code>createEndpoint</code> method.
- // |endpointInfo| : The result of the endpoint creation.
- callback CreateCallback = void (EndpointInfo endpointInfo);
-
- // Callback from the <code>send</code> method.
- // |status| : Status of the send operation.
- callback SendCallback = void (EndpointStatus status);
-
- // These functions all report failures via chrome.runtime.lastError.
- interface Functions {
- // Endpoint functions.
-
- // Creates a endpoint that can be connected to by a nearby devices.
- // |callback| : Called when the endpoint has been created.
- static void createLocalEndpoint(CreateCallback callback);
-
- // Destroys the endpoint. This will close any connections to this endpoint
- // from remote hosts and will prevent any further connections to it.
- // |endpointId|: Endpoint ID returned by <code>createEndpoint</code>.
- static void destroyEndpoint(long endpointId);
-
- // Sends data from a local Copresence endpoint to a remote endpoint.
- // |localEndpointId| : The local endpoint identifier.
- // |remoteEndpointId| : The remote endpoint identifier.
- // |data| : The data to send.
- // |callback| : Called when the <code>send</code> operation completes.
- static void send(long localEndpointId, long remoteEndpointId,
- ArrayBuffer data, optional SendCallback callback);
- };
-
- interface Events {
- // Event raised when data has been received for a given socket.
- // |info| : The event data.
- static void onReceive(ReceiveInfo info);
-
- // Event raised when a endpoint receives a new connection. A new socket is
- // created and the id is passed to this event via socketId.
- // |localEndpointId| : ID of the local endpoint that received this
- // connection.
- // TODO(rkc): This API needs to be modified to give a valid remote endpoint
- // id also. This currently doesn't happen because of the lack of a
- // handshake on a sockets connection. Once we have a handshake, modify this
- // API to also return a remote endpoint id.
- static void onConnected(long localEndpointId);
- };
-};
« no previous file with comments | « extensions/common/api/_api_features.json ('k') | extensions/common/api/schemas.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698