Nigel Tao | 192c330 | 2018-07-19 15:17:28 | [diff] [blame^] | 1 | // 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 | |
| 14 | class Profile; |
| 15 | |
| 16 | namespace web_app { |
| 17 | |
| 18 | class 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. |
| 23 | class 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_ |