chromium/chrome/browser/web_applications/app_service/web_app_publisher_helper.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_WEB_APPLICATIONS_APP_SERVICE_WEB_APP_PUBLISHER_HELPER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_APP_SERVICE_WEB_APP_PUBLISHER_HELPER_H_

#include <stdint.h>

#include <map>
#include <optional>
#include <string>
#include <vector>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "base/types/id_type.h"
#include "build/build_config.h"
#include "build/buildflag.h"
#include "chrome/browser/apps/app_service/launch_result_type.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/browser/web_applications/web_app_install_manager.h"
#include "chrome/browser/web_applications/web_app_install_manager_observer.h"
#include "chrome/browser/web_applications/web_app_registrar.h"
#include "chrome/browser/web_applications/web_app_registrar_observer.h"
#include "components/content_settings/core/browser/content_settings_observer.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/services/app_service/public/cpp/app.h"
#include "components/services/app_service/public/cpp/app_launch_util.h"
#include "components/services/app_service/public/cpp/app_types.h"
#include "components/services/app_service/public/cpp/icon_types.h"
#include "components/services/app_service/public/cpp/intent.h"
#include "components/services/app_service/public/cpp/intent_filter.h"
#include "components/services/app_service/public/cpp/permission.h"
#include "components/webapps/common/web_app_id.h"
#include "ui/gfx/native_widget_types.h"

#if BUILDFLAG(IS_CHROMEOS)
#include "chrome/browser/apps/app_service/app_notifications.h"
#include "chrome/browser/apps/app_service/media_requests.h"
#include "chrome/browser/apps/app_service/paused_apps.h"
#include "chrome/browser/badging/badge_manager_delegate.h"
#include "chrome/browser/media/webrtc/media_stream_capture_indicator.h"
#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_display_service.h"
#endif

class Browser;
class ContentSettingsPattern;
class ContentSettingsTypeSet;
class Profile;
class GURL;

namespace apps {
struct AppLaunchParams;
enum class RunOnOsLoginMode;
enum IconEffects : uint32_t;
}  // namespace apps

namespace badging {
class BadgeManager;
}

namespace base {
class FilePath;
class Time;
}  // namespace base

namespace blink::mojom {
enum class DisplayMode : int32_t;
}

namespace content {
class WebContents;
}

#if BUILDFLAG(IS_CHROMEOS)
namespace message_center {
class Notification;
}
#endif

namespace ui {
enum ResourceScaleFactor : int;
}

namespace webapps {
enum class WebappUninstallSource;
}

namespace web_app {

class WebApp;
class WebAppProvider;
enum class RunOnOsLoginMode;
struct ComputedAppSize;

namespace mojom {
enum class UserDisplayMode : int32_t;
}

struct ShortcutIdTypeMarker {};

ShortcutId;

void UninstallImpl(WebAppProvider* provider,
                   const std::string& app_id,
                   apps::UninstallSource uninstall_source,
                   gfx::NativeWindow parent_window);

class WebAppPublisherHelper : public WebAppRegistrarObserver,
                              public WebAppInstallManagerObserver,
#if BUILDFLAG(IS_CHROMEOS)
                              public NotificationDisplayService::Observer,
                              public MediaStreamCaptureIndicator::Observer,
#endif
                              public content_settings::Observer {};

}  // namespace web_app

#endif  // CHROME_BROWSER_WEB_APPLICATIONS_APP_SERVICE_WEB_APP_PUBLISHER_HELPER_H_