naiveproxy/content/common/child_memory_coordinator.mojom
2018-02-02 05:49:39 -05:00

28 lines
818 B
Plaintext

// 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;
// See base/memory/memory_coordinator_client.h for the definitions of these
// states.
enum MemoryState {
UNKNOWN = -1,
NORMAL = 0,
THROTTLED = 1,
SUSPENDED = 2,
};
// ChildMemoryCoordinator lives in a child process and receives memory events
// dispatched by the central memory coordinator which lives in the browser
// process.
interface ChildMemoryCoordinator {
// Called when the central memory coodinator changes the state for child
// processes.
OnStateChange(MemoryState state);
// Requests the child process to purge memory (e.g. by dropping caches that
// can be easily rebuilt).
PurgeMemory();
};