chromium/chrome/browser/performance_manager/policies/memory_saver_mode_policy.h

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

#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_MEMORY_SAVER_MODE_POLICY_H_
#define CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_MEMORY_SAVER_MODE_POLICY_H_

#include <map>
#include <memory>

#include "base/timer/timer.h"
#include "components/performance_manager/public/decorators/tab_page_decorator.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/public/graph/page_node.h"
#include "components/performance_manager/public/user_tuning/prefs.h"

namespace performance_manager::policies {

// This policy is responsible for discarding tabs after they have been
// backgrounded for a certain amount of time, when Memory Saver Mode is
// enabled by the user.
class MemorySaverModePolicy : public GraphOwned,
                                 public PageNode::ObserverDefaultImpl,
                                 public TabPageObserverDefaultImpl {};

}  // namespace performance_manager::policies

#endif  // CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_MEMORY_SAVER_MODE_POLICY_H_