File: process_internals.mojom

package info (click to toggle)
chromium 140.0.7339.127-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,192,880 kB
  • sloc: cpp: 35,093,808; ansic: 7,161,670; javascript: 4,199,694; python: 1,441,797; asm: 949,904; xml: 747,503; pascal: 187,748; perl: 88,691; sh: 88,248; objc: 79,953; sql: 52,714; cs: 44,599; fortran: 24,137; makefile: 22,114; tcl: 15,277; php: 13,980; yacc: 9,000; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (132 lines) | stat: -rw-r--r-- 4,538 bytes parent folder | download | duplicates (3)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module mojom;

import "url/mojom/url.mojom";

// Describes the current process counts and limit.
struct ProcessCountInfo {
  // Soft limit on renderer processes.
  uint64 renderer_process_limit;

  // Total number of renderer processes.
  uint64 renderer_process_count_total;

  // Total number of live renderer processes.
  uint64 live_renderer_processes_count_total;

  // Total number of renderer processes that actually count towards the limit,
  // possibly ignoring some of the total (e.g., to prevent extensions from using
  // up the limit).
  uint64 renderer_process_count_for_limit;
};

// Basic information describing a SiteInstance.
struct SiteInstanceInfo {
  int32 id;

  // ID of the SiteInstanceGroup this SiteInstance belongs to.
  int32 site_instance_group_id;

  // ID of the BrowsingInstance this SiteInstance belongs to.
  int32 browsing_instance_id;

  // Boolean indicating whether the SiteInstance's process is locked to a
  // specific URL.
  bool locked;

  url.mojom.Url? site_url;

  // The URL to which the SiteInstance's process is locked.
  url.mojom.Url? process_lock_url;

  // Specifies whether the SiteInstance requires an origin-keyed process. This
  // is true for opt-in origin isolation via the OriginAgentCluster header,
  // false otherwise.
  bool requires_origin_keyed_process;

  // Specifies if the SiteInstance is for sandboxed iframe isolation.
  bool is_sandbox_for_iframes;

  // Specifies whether this SiteInstance is for a <webview> guest.
  bool is_guest;

  // Specifies whether this SiteInstance is for a PDF.
  bool is_pdf;

  // Specifies whether this SiteInstance has JavaScript optimizers enabled.
  bool are_javascript_optimizers_enabled;

  // If this SiteInstance uses a non-default StoragePartition, this specifies a
  // string representation of that StoragePartition.
  string? storage_partition;
};

// Basic information describing a frame and all of its subframes.
struct FrameInfo {
  int32 routing_id;
  int32 agent_scheduling_group_id;
  int32 process_id;

  SiteInstanceInfo site_instance;
  url.mojom.Url? last_committed_url;

  array<FrameInfo> subframes;

  enum Type { kActive, kBackForwardCache, kPrerender };
  Type type;
};

// Basic information describing a WebContents object and all frames that are
// in it.
struct WebContentsInfo {
  string title;
  FrameInfo root_frame;
  array<FrameInfo> bfcached_root_frames;
  array<FrameInfo> prerender_root_frames;
};

// Information about a currently active isolated origin, including the origin
// itself and a |source| string that describes how the origin was added.
struct IsolatedOriginInfo {
  string origin;
  string source;
};

// Interface used by chrome://process-internals to query data from the
// browser process.
interface ProcessInternalsHandler {

  // Returns information about the current process count and limit, across all
  // profiles.
  GetProcessCountInfo() => (ProcessCountInfo info);

  // Returns a string containing the currently active isolation modes.
  GetIsolationMode() => (string mode);

  // Returns a string containing the currently active process per site mode.
  GetProcessPerSiteMode() => (string mode);

  // Returns a list of user-triggered isolated origins, which are typically
  // saved when the user types a password into a corresponding site.  These
  // origins apply within the current profile only, they are preserved across
  // restarts, and they are cleared when the user clears browsing data.
  GetUserTriggeredIsolatedOrigins() => (array<string> isolated_origins);

  // Returns a list of web-triggered isolated origins, which are typically
  // added in response to heuristics triggered directly by web sites, such
  // as headers that suggest the site might benefit from isolation.  Like
  // user-triggered isolated origins, these isolated origins apply within
  // the current profile only, they are preserved across
  // restarts, and they are cleared when the user clears browsing data.
  GetWebTriggeredIsolatedOrigins() => (array<string> isolated_origins);

  // Returns a list of isolated origins that apply globally in all profiles.
  GetGloballyIsolatedOrigins() => (array<IsolatedOriginInfo> isolated_origins);

  // Returns an array of WebContentsInfo structs for all WebContents
  // associated with the profile in which this call is made.
  GetAllWebContentsInfo() => (array<WebContentsInfo> infos);
};