cef/patch/patches/chrome_browser_extensions.patch
Marshall Greenblatt f781ea373f Update to Chromium version 120.0.6099.0 (#1217362)
- chrome: Disable upgrade/downgrade behavior (see #3608)
- chrome: Disable process singleton behavior (see #3609)
- chrome: Disable config as default system browser (see #3613)
2023-11-28 12:47:00 -05:00

36 lines
1.5 KiB
Diff

diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc
index 2897ebd032da8..32b2e5d80f39a 100644
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
@@ -14,6 +14,7 @@
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h"
#include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h"
#include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h"
@@ -91,6 +92,10 @@
#include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h"
#endif
+#if BUILDFLAG(ENABLE_CEF)
+#include "cef/libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.h"
+#endif
+
#if BUILDFLAG(ENABLE_PRINTING)
#include "chrome/browser/printing/printing_init.h"
#endif
@@ -318,6 +323,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
std::unique_ptr<MimeHandlerViewGuestDelegate>
ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
MimeHandlerViewGuest* guest) const {
+#if BUILDFLAG(ENABLE_CEF)
+ if (cef::IsChromeRuntimeEnabled()) {
+ return std::make_unique<ChromeMimeHandlerViewGuestDelegateCef>(guest);
+ }
+#endif
return std::make_unique<ChromeMimeHandlerViewGuestDelegate>();
}