mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Set enable_alloy_bootstrap=false to build with Alloy bootstrap code removed. Extension API is documented as deprecated in comments but not compiled out with this arg.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/background_fetch/background_fetch_permission_context.cc chrome/browser/background_fetch/background_fetch_permission_context.cc
|
||||
index 429739d7b8dfe..0f4bff365f62b 100644
|
||||
index 429739d7b8dfe..726cc7d9e9ced 100644
|
||||
--- chrome/browser/background_fetch/background_fetch_permission_context.cc
|
||||
+++ chrome/browser/background_fetch/background_fetch_permission_context.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
@ -10,18 +10,21 @@ index 429739d7b8dfe..0f4bff365f62b 100644
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/download/download_request_limiter.h"
|
||||
@@ -25,7 +26,8 @@ ContentSetting BackgroundFetchPermissionContext::GetPermissionStatusInternal(
|
||||
@@ -25,7 +26,11 @@ ContentSetting BackgroundFetchPermissionContext::GetPermissionStatusInternal(
|
||||
const GURL& embedding_origin) const {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
- if (render_frame_host && !render_frame_host->GetParent()) {
|
||||
+ if (!cef::IsAlloyRuntimeEnabled() &&
|
||||
+ if (
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ !cef::IsAlloyRuntimeEnabled() &&
|
||||
+#endif
|
||||
+ render_frame_host && !render_frame_host->GetParent()) {
|
||||
DownloadRequestLimiter* limiter =
|
||||
g_browser_process->download_request_limiter();
|
||||
DCHECK(limiter);
|
||||
diff --git chrome/browser/background_sync/periodic_background_sync_permission_context.cc chrome/browser/background_sync/periodic_background_sync_permission_context.cc
|
||||
index d63a055919747..8d13959217751 100644
|
||||
index d63a055919747..49adba291f1bb 100644
|
||||
--- chrome/browser/background_sync/periodic_background_sync_permission_context.cc
|
||||
+++ chrome/browser/background_sync/periodic_background_sync_permission_context.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -32,19 +35,21 @@ index d63a055919747..8d13959217751 100644
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
@@ -89,6 +90,10 @@ PeriodicBackgroundSyncPermissionContext::GetPermissionStatusInternal(
|
||||
@@ -89,6 +90,12 @@ PeriodicBackgroundSyncPermissionContext::GetPermissionStatusInternal(
|
||||
return CONTENT_SETTING_ALLOW;
|
||||
#endif
|
||||
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ if (cef::IsAlloyRuntimeEnabled()) {
|
||||
+ return CONTENT_SETTING_BLOCK;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
bool can_bypass_install_requirement =
|
||||
base::FeatureList::IsEnabled(
|
||||
features::kPeriodicSyncPermissionForDefaultSearchEngine) &&
|
||||
diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc
|
||||
index 7f14b48feedf6..cfcf4554c1d4d 100644
|
||||
index 7f14b48feedf6..9679552640788 100644
|
||||
--- chrome/browser/permissions/chrome_permissions_client.cc
|
||||
+++ chrome/browser/permissions/chrome_permissions_client.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
@ -55,29 +60,35 @@ index 7f14b48feedf6..cfcf4554c1d4d 100644
|
||||
#include "chrome/browser/ash/shimless_rma/chrome_shimless_rma_delegate.h"
|
||||
#include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -190,6 +191,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
|
||||
@@ -190,6 +191,11 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
|
||||
double ChromePermissionsClient::GetSiteEngagementScore(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& origin) {
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ // No SiteEngagementService with the Alloy runtime.
|
||||
+ if (cef::IsAlloyRuntimeEnabled())
|
||||
+ return 0.0;
|
||||
+#endif
|
||||
return site_engagement::SiteEngagementService::Get(
|
||||
Profile::FromBrowserContext(browser_context))
|
||||
->GetScore(origin);
|
||||
@@ -360,8 +364,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
|
||||
@@ -360,8 +366,14 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
|
||||
std::make_unique<ContextualNotificationPermissionUiSelector>());
|
||||
selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>(
|
||||
Profile::FromBrowserContext(browser_context)));
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ if (!cef::IsAlloyRuntimeEnabled()) {
|
||||
+#endif
|
||||
selectors.emplace_back(std::make_unique<PredictionBasedPermissionUiSelector>(
|
||||
Profile::FromBrowserContext(browser_context)));
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ }
|
||||
+#endif
|
||||
return selectors;
|
||||
}
|
||||
|
||||
diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc
|
||||
index 1ad4009827a9d..ca054482954f9 100644
|
||||
index 1ad4009827a9d..6aba08191cf35 100644
|
||||
--- chrome/browser/permissions/permission_manager_factory.cc
|
||||
+++ chrome/browser/permissions/permission_manager_factory.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -88,20 +99,24 @@ index 1ad4009827a9d..ca054482954f9 100644
|
||||
#include "chrome/browser/background_fetch/background_fetch_permission_context.h"
|
||||
#include "chrome/browser/background_sync/periodic_background_sync_permission_context.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
@@ -64,9 +65,11 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
|
||||
@@ -64,9 +65,15 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
|
||||
std::make_unique<GeolocationPermissionContextDelegate>(profile);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ if (!cef::IsAlloyRuntimeEnabled()) {
|
||||
+#endif
|
||||
delegates.geolocation_system_permission_manager =
|
||||
device::GeolocationSystemPermissionManager::GetInstance();
|
||||
DCHECK(delegates.geolocation_system_permission_manager);
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ }
|
||||
+#endif
|
||||
#endif
|
||||
delegates.media_stream_device_enumerator =
|
||||
MediaCaptureDevicesDispatcher::GetInstance();
|
||||
diff --git chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/storage/durable_storage_permission_context.cc
|
||||
index 9934727f31a59..765b822241e4d 100644
|
||||
index 9934727f31a59..9ab13938d39c2 100644
|
||||
--- chrome/browser/storage/durable_storage_permission_context.cc
|
||||
+++ chrome/browser/storage/durable_storage_permission_context.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
@ -112,14 +127,17 @@ index 9934727f31a59..765b822241e4d 100644
|
||||
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
||||
#include "chrome/browser/content_settings/cookie_settings_factory.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
@@ -56,7 +57,10 @@ void DurableStoragePermissionContext::DecidePermission(
|
||||
@@ -56,7 +57,13 @@ void DurableStoragePermissionContext::DecidePermission(
|
||||
|
||||
// Durable is only allowed to be granted to the top-level origin. Embedding
|
||||
// origin is the last committed navigation origin to the web contents.
|
||||
- if (request_data.requesting_origin != request_data.embedding_origin) {
|
||||
+ // Permission depends on PWA and site engagement subsystems which are not
|
||||
+ // supported by the Alloy runtime (see issue #3379).
|
||||
+ if (cef::IsAlloyRuntimeEnabled() ||
|
||||
+ if (
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ cef::IsAlloyRuntimeEnabled() ||
|
||||
+#endif
|
||||
+ request_data.requesting_origin != request_data.embedding_origin) {
|
||||
NotifyPermissionSet(request_data.id, request_data.requesting_origin,
|
||||
request_data.embedding_origin, std::move(callback),
|
||||
@ -176,7 +194,7 @@ index 613500ba8c3d3..36c9aa0d2ea71 100644
|
||||
if (!browser) {
|
||||
DLOG(WARNING) << "Permission prompt suppressed because the WebContents is "
|
||||
diff --git components/embedder_support/permission_context_utils.cc components/embedder_support/permission_context_utils.cc
|
||||
index 9c0ec651d494f..e5c6126adeea7 100644
|
||||
index 9c0ec651d494f..8ba6512557edc 100644
|
||||
--- components/embedder_support/permission_context_utils.cc
|
||||
+++ components/embedder_support/permission_context_utils.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@ -187,21 +205,25 @@ index 9c0ec651d494f..e5c6126adeea7 100644
|
||||
#include "components/background_sync/background_sync_permission_context.h"
|
||||
#include "components/permissions/contexts/accessibility_permission_context.h"
|
||||
#include "components/permissions/contexts/camera_pan_tilt_zoom_permission_context.h"
|
||||
@@ -79,10 +80,17 @@ CreateDefaultPermissionContexts(content::BrowserContext* browser_context,
|
||||
@@ -79,10 +80,21 @@ CreateDefaultPermissionContexts(content::BrowserContext* browser_context,
|
||||
std::move(delegates.geolocation_permission_context_delegate),
|
||||
is_regular_profile);
|
||||
#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ if (cef::IsAlloyRuntimeEnabled()) {
|
||||
+ permission_contexts[ContentSettingsType::GEOLOCATION] =
|
||||
+ std::make_unique<permissions::GeolocationPermissionContext>(
|
||||
+ browser_context,
|
||||
+ std::move(delegates.geolocation_permission_context_delegate));
|
||||
+ } else {
|
||||
+#endif
|
||||
permission_contexts[ContentSettingsType::GEOLOCATION] =
|
||||
std::make_unique<permissions::GeolocationPermissionContextSystem>(
|
||||
browser_context,
|
||||
std::move(delegates.geolocation_permission_context_delegate));
|
||||
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
+ }
|
||||
+#endif
|
||||
#else
|
||||
permission_contexts[ContentSettingsType::GEOLOCATION] =
|
||||
std::make_unique<permissions::GeolocationPermissionContext>(
|
||||
|
Reference in New Issue
Block a user