-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iwa: Enable isolated web apps by enterprise policy
This CL enables IWAs by the enterprise policy. So far this policy is available for trusted testers only. Before this CL we just check the feature flag. After this CL we also check: - code in //chrome and //contents in fact use an overridden method in the content browser client; - code in render process check a command line flag. We use command line flags to propagate policy in the render process. Design doc: go/iwa-mgs Bug: 1364132 Change-Id: Iad7ea1367d737b0a46dcf93ec6d63a4ed353e2a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4181324 Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Commit-Queue: Oleksandr Peletskyi <peletskyi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1100982}
- Loading branch information
Showing
17 changed files
with
130 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
#include "content/public/browser/isolated_web_apps_policy.h" | ||
|
||
#include "content/public/browser/content_browser_client.h" | ||
#include "content/public/common/content_client.h" | ||
|
||
namespace content { | ||
// static | ||
bool IsolatedWebAppsPolicy::AreIsolatedWebAppsEnabled( | ||
BrowserContext* browser_context) { | ||
return GetContentClient()->browser()->AreIsolatedWebAppsEnabled( | ||
browser_context); | ||
} | ||
} // namespace content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
#ifndef CONTENT_PUBLIC_BROWSER_ISOLATED_WEB_APPS_POLICY_H_ | ||
#define CONTENT_PUBLIC_BROWSER_ISOLATED_WEB_APPS_POLICY_H_ | ||
|
||
#include "content/common/content_export.h" | ||
|
||
namespace content { | ||
|
||
class BrowserContext; | ||
|
||
// A centralized place for making a decision about Isolated Web Apps (IWAs). | ||
// For more information about IWAs, see: | ||
// https://github.com/WICG/isolated-web-apps/blob/main/README.md | ||
|
||
class CONTENT_EXPORT IsolatedWebAppsPolicy { | ||
public: | ||
IsolatedWebAppsPolicy(const IsolatedWebAppsPolicy&) = delete; | ||
IsolatedWebAppsPolicy& operator=(const IsolatedWebAppsPolicy&) = delete; | ||
IsolatedWebAppsPolicy() = delete; | ||
|
||
// Returns true if Isolated Web Apps are enabled. | ||
static bool AreIsolatedWebAppsEnabled(BrowserContext* browser_context); | ||
}; | ||
|
||
} // namespace content | ||
|
||
#endif // CONTENT_PUBLIC_BROWSER_ISOLATED_WEB_APPS_POLICY_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters