blob: 9d8019a184d5f6dda954f9cdd242d041037efc30 [file] [log] [blame]
Evan Stadeaecdf1b52020-12-02 03:01:531// Copyright 2020 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
Evan Stade2229a562021-01-12 18:30:075#ifndef COMPONENTS_WEBAPPS_BROWSER_ANDROID_WEBAPPS_UTILS_H_
6#define COMPONENTS_WEBAPPS_BROWSER_ANDROID_WEBAPPS_UTILS_H_
Evan Stadeaecdf1b52020-12-02 03:01:537
8class GURL;
9
Evan Stadecf7586242020-12-17 20:38:4910namespace blink {
11struct Manifest;
12}
13
Evan Stadeaecdf1b52020-12-02 03:01:5314namespace content {
15class BrowserContext;
16}
17
18namespace webapps {
19
20class WebappsUtils {
21 public:
22 WebappsUtils() = delete;
23 WebappsUtils& operator=(const WebappsUtils&) = delete;
24 WebappsUtils(const WebappsUtils&) = delete;
25
26 // Returns true if there is an installed WebAPK which can handle |url|.
27 static bool IsWebApkInstalled(content::BrowserContext* browser_context,
28 const GURL& url);
Evan Stadecf7586242020-12-17 20:38:4929
30 // Returns whether the format of the URLs in the Web Manifest is WebAPK
31 // compatible.
32 static bool AreWebManifestUrlsWebApkCompatible(
33 const blink::Manifest& manifest);
Evan Stadeaecdf1b52020-12-02 03:01:5334};
35
36} // namespace webapps
37
Evan Stade2229a562021-01-12 18:30:0738#endif // COMPONENTS_WEBAPPS_BROWSER_ANDROID_WEBAPPS_UTILS_H_