summaryrefslogtreecommitdiff
path: root/chromium/fuchsia/fidl/cast/api_bindings.fidl
blob: a44d0dcd43b1c69ab6a11f519cd8b35d0978f58d (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
// 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.

library chromium.cast;

using fuchsia.mem;
using fuchsia.web;

/// Provides Cast platform API binding scripts and methods for connecting those
/// scripts with Agent backends.
[Discoverable]
protocol ApiBindings {
    /// Gets the list of bindings to early-inject into the page at load time.
    GetAll() -> (vector<ApiBinding> bindings);

    /// Should be invoked when a connecting a named MessagePort to a native
    /// bindings backend.
    Connect(string port_name, fuchsia.web.MessagePort message_port);
};

table ApiBinding {
    /// Script to execute before the load of a web document.
    1: fuchsia.mem.Buffer before_load_script;
};