chromium/chrome/browser/enterprise/idle/idle_service.cc

// 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.

#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  // !BUILDFLAG(IS_ANDROID)

namespace enterprise_idle {

#if !BUILDFLAG(IS_ANDROID)
// Observes OnBrowserSetLastActive(). If the kIdleTimeoutShowBubbleOnStartup
// pref is true, it shows a bubble when a browser comes into focus. See
// ShowBubbleAction.
class IdleService::BrowserObserver : public BrowserListObserver {};
#else
// BrowserObserver for Android, to minimize #ifdef hell.
class IdleService::BrowserObserver {
 public:
  explicit BrowserObserver(Profile* profile) {}
  void StartObserving() {}
  void StopObserving() {}
};
#endif  // !BUILDFLAG(IS_ANDROID)

IdleService::IdleService(Profile* profile)
    :{}

IdleService::~IdleService() = default;

void IdleService::OnIdleTimeoutPrefChanged() {}

base::TimeDelta IdleService::GetTimeout() const {}

void IdleService::OnIdleStateChange(
    const ui::IdlePollingService::State& polled_state) {}

}  // namespace enterprise_idle