chromium/third_party/cros_system_api/dbus/resource_manager/dbus-constants.h

// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SYSTEM_API_DBUS_RESOURCE_MANAGER_DBUS_CONSTANTS_H_
#define SYSTEM_API_DBUS_RESOURCE_MANAGER_DBUS_CONSTANTS_H_

namespace resource_manager {

const char kResourceManagerInterface[] =;
const char kResourceManagerServicePath[] =;
const char kResourceManagerServiceName[] =;

// Values.
enum GameMode {};

enum PressureLevelChrome {};

enum class PressureLevelArcContainer {};

enum class ProcessState {};

enum class ThreadState {};

// Methods.
const char kGetAvailableMemoryKBMethod[] =;
const char kGetForegroundAvailableMemoryKBMethod[] =;
const char kGetMemoryMarginsKBMethod[] =;
const char kGetComponentMemoryMarginsKBMethod[] =;
const char kGetGameModeMethod[] =;
const char kSetGameModeMethod[] =;
const char kSetGameModeWithTimeoutMethod[] =;
const char kSetMemoryMarginsBps[] =;
const char kSetFullscreenVideoWithTimeout[] =;
const char kSetVmBootModeWithTimeoutMethod[] =;
const char kReportBrowserProcessesMethod[] =;
const char kSetProcessStateMethod[] =;
const char kSetThreadStateMethod[] =;

// Signals.

// MemoryPressureChrome signal contains 2 arguments:
//   1. pressure_level, BYTE, see also enum PressureLevelChrome.
//   2. reclaim_target_kb, UINT64, memory amount to free in KB to leave the
//   current pressure level.
//   E.g., argument (PressureLevelChrome::CRITICAL, 10000): Chrome should free
//   10000 KB to leave the critical memory pressure level (to moderate pressure
//   level).
const char kMemoryPressureChrome[] =;

// MemoryPressureArcContainer signal contains 2 arguments:
//   1. pressure_level, BYTE, see also enum PressureLevelArcContainer.
//   2. delta, UINT64, memory amount to free in KB to leave the current
//   pressure level.
//   E.g. argument (PressureLevelArcContainer::FOREGROUND, 10000): ARC container
//   should free 10000 KB to leave the foreground memory pressure level (to
//   perceptible pressure level).
const char kMemoryPressureArcContainer[] =;

}  // namespace resource_manager

#endif  // SYSTEM_API_DBUS_RESOURCE_MANAGER_DBUS_CONSTANTS_H_