blob: f2bec237ab7267e0869fde01035e91b33b9ad52d [file] [log] [blame]
Nigel Tao192c3302018-07-19 15:17:281// Copyright 2018 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_WEB_APP_PROVIDER_H_
6#define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_PROVIDER_H_
7
8#include <memory>
9
10#include "base/macros.h"
11#include "components/keyed_service/core/keyed_service.h"
12#include "components/prefs/pref_service.h"
13
14class Profile;
15
16namespace web_app {
17
18class WebAppPolicyManager;
19
20// Connects Web App features, such as the installation of default and
21// policy-managed web apps, with Profiles (as WebAppProvider is a
22// Profile-linked KeyedService) and their associated PrefService.
23class WebAppProvider : public KeyedService {
24 public:
25 static WebAppProvider* Get(Profile* profile);
26
27 explicit WebAppProvider(PrefService* pref_service);
28
29 ~WebAppProvider() override;
30
31 private:
32 std::unique_ptr<WebAppPolicyManager> web_app_policy_manager_;
33
34 DISALLOW_COPY_AND_ASSIGN(WebAppProvider);
35};
36
37} // namespace web_app
38
39#endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_PROVIDER_H_