summaryrefslogtreecommitdiff
path: root/chromium/content/common/render_message_filter.mojom
blob: 52092d89fab8a897783fbeddf42b3ff5ca7de85f (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// 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/public/mojom/base/string16.mojom";
import "mojo/common/time.mojom";
import "url/mojom/origin.mojom";
import "url/mojom/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(https://crbug.com/779444): 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.
  DidGenerateCacheableMetadataInCacheStorage(
      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(https://crbug.com/676224).  Only used for MacOS.
  [Sync] LoadFont(mojo_base.mojom.String16 font_name, float font_point_size)
      => (uint32 buffer_size, handle<shared_buffer>? font_data, uint32 font_id);
};