| // Copyright 2019 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. |
| |
| module blink.mojom; |
| |
| import "services/network/public/mojom/site_for_cookies.mojom"; |
| import "services/network/public/mojom/websocket.mojom"; |
| import "url/mojom/url.mojom"; |
| |
| // An interface for creating a WebSocket connection from the renderer, |
| // implemented in the browser process. |
| interface WebSocketConnector { |
| // Starts an opening handshake. |
| // |user_agent| is a "user-agent" request header value. For other params, see |
| // CreateWebSocket in //services/network/public/mojom/network_context.mojom. |
| // It is recommended to detect mojo connection errors on |handshake_client| |
| // until the connection is established. See network_context.mojom for details. |
| Connect(url.mojom.Url url, |
| array<string> requested_protocols, |
| network.mojom.SiteForCookies site_for_cookies, |
| string? user_agent, |
| pending_remote<network.mojom.WebSocketHandshakeClient> handshake_client); |
| }; |