| Index: third_party/grpc/src/core/iomgr/endpoint.c
|
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.idl b/third_party/grpc/src/core/iomgr/endpoint.c
|
| similarity index 56%
|
| copy from third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.idl
|
| copy to third_party/grpc/src/core/iomgr/endpoint.c
|
| index fca2392c2ec58409ba5ed33c98a29488762b0470..bd64707669cad921410d01aa71de25e5968d3426 100644
|
| --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.idl
|
| +++ b/third_party/grpc/src/core/iomgr/endpoint.c
|
| @@ -1,5 +1,7 @@
|
| /*
|
| - * Copyright (C) 2013 Google Inc. All rights reserved.
|
| + *
|
| + * Copyright 2015, Google Inc.
|
| + * All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -26,18 +28,40 @@
|
| * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| + *
|
| */
|
|
|
| -// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#service-worker-container-interface
|
| -[
|
| -] interface ServiceWorkerContainer : EventTarget {
|
| - [Unforgeable] readonly attribute ServiceWorker? controller;
|
| - [CallWith=ScriptState] readonly attribute Promise<ServiceWorkerRegistration> ready;
|
| +#include "src/core/iomgr/endpoint.h"
|
| +
|
| +void grpc_endpoint_read(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep,
|
| + gpr_slice_buffer* slices, grpc_closure* cb) {
|
| + ep->vtable->read(exec_ctx, ep, slices, cb);
|
| +}
|
| +
|
| +void grpc_endpoint_write(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep,
|
| + gpr_slice_buffer* slices, grpc_closure* cb) {
|
| + ep->vtable->write(exec_ctx, ep, slices, cb);
|
| +}
|
| +
|
| +void grpc_endpoint_add_to_pollset(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep,
|
| + grpc_pollset* pollset) {
|
| + ep->vtable->add_to_pollset(exec_ctx, ep, pollset);
|
| +}
|
| +
|
| +void grpc_endpoint_add_to_pollset_set(grpc_exec_ctx* exec_ctx,
|
| + grpc_endpoint* ep,
|
| + grpc_pollset_set* pollset_set) {
|
| + ep->vtable->add_to_pollset_set(exec_ctx, ep, pollset_set);
|
| +}
|
| +
|
| +void grpc_endpoint_shutdown(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep) {
|
| + ep->vtable->shutdown(exec_ctx, ep);
|
| +}
|
|
|
| - [CallWith=ScriptState, ImplementedAs=registerServiceWorker] Promise<ServiceWorkerRegistration> register(USVString url, optional RegistrationOptions options);
|
| - [CallWith=ScriptState] Promise<ServiceWorkerRegistration> getRegistration(optional USVString documentURL = "");
|
| - [CallWith=ScriptState] Promise<sequence<ServiceWorkerRegistration>> getRegistrations();
|
| +void grpc_endpoint_destroy(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep) {
|
| + ep->vtable->destroy(exec_ctx, ep);
|
| +}
|
|
|
| - attribute EventHandler oncontrollerchange;
|
| - attribute EventHandler onmessage;
|
| -};
|
| +char* grpc_endpoint_get_peer(grpc_endpoint* ep) {
|
| + return ep->vtable->get_peer(ep);
|
| +}
|
|
|