#include "chrome/browser/enterprise/idle/idle_service.h"
#include <algorithm>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/values_util.h"
#include "base/task/single_thread_task_runner.h"
#include "chrome/browser/enterprise/idle/idle_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "components/enterprise/idle/idle_pref_names.h"
#include "components/prefs/pref_service.h"
#include "ui/base/idle/idle.h"
#include "ui/base/idle/idle_polling_service.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/idle_bubble.h"
#endif
namespace enterprise_idle {
#if !BUILDFLAG(IS_ANDROID)
class IdleService::BrowserObserver : public BrowserListObserver { … };
#else
class IdleService::BrowserObserver {
public:
explicit BrowserObserver(Profile* profile) {}
void StartObserving() {}
void StopObserving() {}
};
#endif
IdleService::IdleService(Profile* profile)
: … { … }
IdleService::~IdleService() = default;
void IdleService::OnIdleTimeoutPrefChanged() { … }
base::TimeDelta IdleService::GetTimeout() const { … }
void IdleService::OnIdleStateChange(
const ui::IdlePollingService::State& polled_state) { … }
}