2021-11-17 01:17:39 +01:00
|
|
|
diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
2023-01-23 18:59:09 +01:00
|
|
|
index 19a81f51a14c1..41dbb40ff4586 100644
|
2021-11-17 01:17:39 +01:00
|
|
|
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
|
|
|
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -13,6 +13,7 @@
|
|
|
|
#include "base/strings/string_util.h"
|
2021-11-17 01:17:39 +01:00
|
|
|
#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"
|
2022-10-17 19:27:40 +02:00
|
|
|
@@ -83,6 +84,10 @@
|
2021-11-17 01:17:39 +01:00
|
|
|
#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_PDF)
|
|
|
|
#include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h"
|
|
|
|
#include "components/pdf/browser/pdf_web_contents_helper.h"
|
2023-01-23 18:59:09 +01:00
|
|
|
@@ -305,6 +310,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate(
|
2021-11-17 01:17:39 +01:00
|
|
|
std::unique_ptr<MimeHandlerViewGuestDelegate>
|
|
|
|
ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
|
|
|
|
MimeHandlerViewGuest* guest) const {
|
2023-01-23 18:59:09 +01:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2021-11-17 01:17:39 +01:00
|
|
|
+ if (cef::IsChromeRuntimeEnabled()) {
|
|
|
|
+ return std::make_unique<ChromeMimeHandlerViewGuestDelegateCef>(guest);
|
|
|
|
+ }
|
2023-01-23 18:59:09 +01:00
|
|
|
+#endif
|
2021-11-17 01:17:39 +01:00
|
|
|
return std::make_unique<ChromeMimeHandlerViewGuestDelegate>();
|
|
|
|
}
|
|
|
|
|