| // Copyright 2017 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 resource_coordinator.mojom; |
| |
| import "services/resource_coordinator/public/mojom/coordination_unit.mojom"; |
| import "mojo/public/mojom/base/process_id.mojom"; |
| import "mojo/public/mojom/base/time.mojom"; |
| |
| // A |PageInfo| describes some metrics about a particular page with respect to |
| // a given process. |
| struct PageInfo { |
| // Identifier to distinguish which URL this |PageInfo| corresponds to. |
| int64 ukm_source_id; |
| // Identifier to distinguish which tab this |PageInfo| corresponds to. |
| uint64 tab_id; |
| // True iff the process for this |PageInfo| hosts the main frame of the page. |
| bool hosts_main_frame; |
| bool is_visible; |
| mojo_base.mojom.TimeDelta time_since_last_navigation; |
| mojo_base.mojom.TimeDelta time_since_last_visibility_change; |
| }; |
| |
| struct ProcessInfo { |
| mojo_base.mojom.ProcessId pid; |
| array<PageInfo> page_infos; |
| mojo_base.mojom.Time? launch_time; |
| }; |
| |
| interface CoordinationUnitIntrospector { |
| // Returns an array that describes the current topology of Chrome, with |
| // respect to the relationship between processes and hosted frame URLs. |
| GetProcessToURLMap() => (array<ProcessInfo> process_infos); |
| }; |