aboutsummaryrefslogtreecommitdiff
path: root/cast/cast_core/api/v2/core_message_port_application_service.proto
blob: 9dcd918e60d8e4e4233c511cbed870cc427880e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2021 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.
//
// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";

package cast.v2;

import "cast/cast_core/api/bindings/api_bindings.proto";
import "cast/cast_core/api/web/message_channel.proto";

option optimize_for = LITE_RUNTIME;

// This service runs in Cast Core for a particular app. It uses a MessagePort to
// communicate with the app.
service CoreMessagePortApplicationService {
  // Posts messages between MessagePorts. MessagePorts are connected using other
  // services (e.g. ApiBindings), then registered with the
  // MessageConnectorService to communicate over IPC.
  rpc PostMessage(cast.web.Message) returns (cast.web.MessagePortStatus);

  // Gets the list of bindings to early-inject into javascript at page load.
  rpc GetAll(cast.bindings.GetAllRequest)
      returns (cast.bindings.GetAllResponse);

  // Connects to a binding returned by GetAll.
  rpc Connect(cast.bindings.ConnectRequest)
      returns (cast.bindings.ConnectResponse);
}