chromium/chrome/browser/apps/app_service/publisher_host.h

// Copyright 2021 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_APPS_APP_SERVICE_PUBLISHER_HOST_H_
#define CHROME_BROWSER_APPS_APP_SERVICE_PUBLISHER_HOST_H_

#include <memory>

#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/apps/app_service/app_service_proxy_forward.h"

namespace web_app {
class WebApps;
}  // namespace web_app

namespace apps {

#if BUILDFLAG(IS_CHROMEOS_ASH)
class BorealisApps;
class BruschettaApps;
class BuiltInChromeOsApps;
class CrostiniApps;
class ExtensionAppsChromeOs;
class PluginVmApps;
class StandaloneBrowserApps;
#else
class ExtensionApps;
#endif

// PublisherHost saves publishers created by AppServiceProxy for the ash side
// Chrome OS and other platforms, and excludes the Lacros side, because
// AppServiceProxy in Lacros doesn't have/create any publisher.
class PublisherHost {};

#if BUILDFLAG(IS_CHROMEOS_ASH)
class ScopedOmitBorealisAppsForTesting {
 public:
  ScopedOmitBorealisAppsForTesting();
  ScopedOmitBorealisAppsForTesting(const ScopedOmitBorealisAppsForTesting&) =
      delete;
  ScopedOmitBorealisAppsForTesting& operator=(
      const ScopedOmitBorealisAppsForTesting&) = delete;
  ~ScopedOmitBorealisAppsForTesting();

 private:
  const bool previous_omit_borealis_apps_for_testing_;
};

class ScopedOmitBuiltInAppsForTesting {
 public:
  ScopedOmitBuiltInAppsForTesting();
  ScopedOmitBuiltInAppsForTesting(const ScopedOmitBuiltInAppsForTesting&) =
      delete;
  ScopedOmitBuiltInAppsForTesting& operator=(
      const ScopedOmitBuiltInAppsForTesting&) = delete;
  ~ScopedOmitBuiltInAppsForTesting();

 private:
  const bool previous_omit_built_in_apps_for_testing_;
};

class ScopedOmitPluginVmAppsForTesting {
 public:
  ScopedOmitPluginVmAppsForTesting();
  ScopedOmitPluginVmAppsForTesting(const ScopedOmitPluginVmAppsForTesting&) =
      delete;
  ScopedOmitPluginVmAppsForTesting& operator=(
      const ScopedOmitPluginVmAppsForTesting&) = delete;
  ~ScopedOmitPluginVmAppsForTesting();

 private:
  const bool previous_omit_plugin_vm_apps_for_testing_;
};
#endif

}  // namespace apps

#endif  // CHROME_BROWSER_APPS_APP_SERVICE_PUBLISHER_HOST_H_