mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
// Copyright (c) 2022 Microsoft, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
module node.mojom;
|
|
|
|
import "mojo/public/mojom/base/file_path.mojom";
|
|
import "sandbox/policy/mojom/sandbox.mojom";
|
|
import "services/network/public/mojom/host_resolver.mojom";
|
|
import "services/network/public/mojom/url_loader_factory.mojom";
|
|
import "third_party/blink/public/mojom/ai/ai_manager.mojom";
|
|
import "third_party/blink/public/mojom/messaging/message_port_descriptor.mojom";
|
|
import "url/mojom/origin.mojom";
|
|
|
|
struct URLLoaderFactoryParams {
|
|
pending_remote<network.mojom.URLLoaderFactory> url_loader_factory;
|
|
pending_remote<network.mojom.HostResolver> host_resolver;
|
|
bool use_network_observer_from_url_loader_factory = false;
|
|
};
|
|
|
|
struct NodeServiceParams {
|
|
mojo_base.mojom.FilePath script;
|
|
array<string> args;
|
|
array<string> exec_args;
|
|
blink.mojom.MessagePortDescriptor port;
|
|
URLLoaderFactoryParams url_loader_factory_params;
|
|
};
|
|
|
|
struct BindAIManagerParams {
|
|
int32? web_contents_id;
|
|
url.mojom.Origin security_origin;
|
|
};
|
|
|
|
interface NodeServiceClient {
|
|
OnV8FatalError(string location, string report);
|
|
};
|
|
|
|
[ServiceSandbox=sandbox.mojom.Sandbox.kNoSandbox]
|
|
interface NodeService {
|
|
Initialize(NodeServiceParams params,
|
|
pending_remote<NodeServiceClient> client_remote);
|
|
|
|
UpdateURLLoaderFactory(URLLoaderFactoryParams params);
|
|
|
|
[EnableIf=enable_prompt_api]
|
|
BindAIManager(BindAIManagerParams params,
|
|
pending_receiver<blink.mojom.AIManager> ai_manager);
|
|
};
|