blob: c51b990a2edafd44e7950eb2437f022811a73bac [file] [log] [blame]
// Copyright 2016 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 content.mojom;
import "content/common/input/input_handler.mojom";
import "content/common/native_types.mojom";
import "content/common/widget.mojom";
import "mojo/common/thread_priority.mojom";
import "mojo/common/string16.mojom";
import "mojo/common/time.mojom";
import "url/mojo/origin.mojom";
import "url/mojo/url.mojom";
interface RenderMessageFilter {
// Synchronously generates a new routing ID for the caller.
[Sync] GenerateRoutingID() => (int32 routing_id);
// Similar to CreateWindow, except used for sub-widgets, like <select>
// dropdowns.
[Sync] CreateNewWidget(int32 opener_id, content.mojom.WebPopupType popup_type, Widget widget)
=> (int32 route_id);
// Similar to CreateWidget except the widget is a full screen window.
[Sync] CreateFullscreenWidget(int32 opener_id, Widget widget)
=> (int32 route_id);
// Requests that the browser cache |data| associated with |url| and |expected_response_time|.
// TODO( Verify or remove |url| and |cache_storage_origin|.
DidGenerateCacheableMetadata(url.mojom.Url url,
mojo.common.mojom.Time expected_response_time,
array<uint8> data);
// Requests that the browser cache |data| for the specified CacheStorage entry.
url.mojom.Url url, mojo.common.mojom.Time expected_response_time,
array<uint8> data, url.mojom.Origin cache_storage_origin,
string cache_storage_cache_name);
// A renderer sends this when it wants to know whether a gpu process exists.
[Sync] HasGpuProcess() => (bool has_gpu_process);
// Asks the browser to change the priority of thread.
// (Linux only, NOP on other platforms.)
SetThreadPriority(int32 platform_thread_id,
mojo.common.mojom.ThreadPriority thread_priority);
// Request that the browser load a font into shared memory for us.
// TODO( Only used for MacOS.
[Sync] LoadFont(mojo.common.mojom.String16 font_name, float font_point_size)
=> (uint32 buffer_size, handle<shared_buffer>? font_data, uint32 font_id);