naiveproxy/chrome/common/resource_usage_reporter.mojom

42 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2018-02-02 13:49:39 +03:00
// Copyright 2015 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 chrome.mojom;
// Mirror of blink::WebCache::ResourceTypeStat.
// Note: These are size_t in blink.
struct ResourceTypeStat {
uint64 count = 0;
uint64 size = 0;
uint64 live_size = 0;
uint64 decoded_size = 0;
};
// Blink resource cache statistics. Mirror of
// blink::WebCache::ResourceTypeStats.
struct ResourceTypeStats {
ResourceTypeStat images;
ResourceTypeStat css_style_sheets;
ResourceTypeStat scripts;
ResourceTypeStat xsl_style_sheets;
ResourceTypeStat fonts;
ResourceTypeStat other;
};
struct ResourceUsageData {
// V8 memory usage information.
// NOTE: For utility processes, this only reports V8 memory used by the proxy
// resolver.
bool reports_v8_stats = false;
uint64 v8_bytes_allocated = 0;
uint64 v8_bytes_used = 0;
// Blink cache information.
ResourceTypeStats? web_cache_stats;
};
interface ResourceUsageReporter {
GetUsageData() => (ResourceUsageData data);
};