1 // Copyright 2019 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_PROVIDER_BASE_H_ 6 #define CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_PROVIDER_BASE_H_ 7 8 #include "components/keyed_service/core/keyed_service.h" 9 10 class Profile; 11 12 namespace web_app { 13 14 // Forward declarations of generalized interfaces. 15 class AppIconManager; 16 class AppRegistrar; 17 class AppRegistryController; 18 class InstallFinalizer; 19 class InstallManager; 20 class ManifestUpdateManager; 21 class PendingAppManager; 22 class SystemWebAppManager; 23 class WebAppAudioFocusIdMap; 24 class WebAppPolicyManager; 25 class WebAppUiManager; 26 class SystemWebAppManager; 27 class OsIntegrationManager; 28 29 class WebAppProviderBase : public KeyedService { 30 public: 31 static WebAppProviderBase* GetProviderBase(Profile* profile); 32 33 WebAppProviderBase(); 34 WebAppProviderBase(const WebAppProviderBase&) = delete; 35 WebAppProviderBase& operator=(const WebAppProviderBase&) = delete; 36 ~WebAppProviderBase() override; 37 38 // The app registry model. 39 virtual AppRegistrar& registrar() = 0; 40 // The app registry controller. 41 virtual AppRegistryController& registry_controller() = 0; 42 // UIs can use InstallManager for user-initiated Web Apps install. 43 virtual InstallManager& install_manager() = 0; 44 // Implements persistence for Web Apps install. 45 virtual InstallFinalizer& install_finalizer() = 0; 46 // Keeps app metadata up to date with site manifests. 47 virtual ManifestUpdateManager& manifest_update_manager() = 0; 48 // Clients can use PendingAppManager to install, uninstall, and update 49 // Web Apps. 50 virtual PendingAppManager& pending_app_manager() = 0; 51 // Clients can use WebAppPolicyManager to request updates of policy installed 52 // Web Apps. 53 virtual WebAppPolicyManager& policy_manager() = 0; 54 55 virtual WebAppUiManager& ui_manager() = 0; 56 57 virtual WebAppAudioFocusIdMap& audio_focus_id_map() = 0; 58 59 // Implements fetching of app icons. 60 virtual AppIconManager& icon_manager() = 0; 61 62 virtual SystemWebAppManager& system_web_app_manager() = 0; 63 64 // Manage all OS hooks that need to be deployed during Web Apps install 65 virtual OsIntegrationManager& os_integration_manager() = 0; 66 67 }; 68 69 } // namespace web_app 70 71 #endif // CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_PROVIDER_BASE_H_ 72