1diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc 2index b13f110636723..e5012dd4208e8 100644 3--- chrome/browser/extensions/api/chrome_extensions_api_client.cc 4+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc 5@@ -14,6 +14,7 @@ 6 #include "base/task/post_task.h" 7 #include "build/build_config.h" 8 #include "build/chromeos_buildflags.h" 9+#include "cef/libcef/features/runtime.h" 10 #include "chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h" 11 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" 12 #include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h" 13@@ -75,6 +76,10 @@ 14 #include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h" 15 #endif 16 17+#if BUILDFLAG(ENABLE_CEF) 18+#include "cef/libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.h" 19+#endif 20+ 21 #if BUILDFLAG(ENABLE_PDF) 22 #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" 23 #include "components/pdf/browser/pdf_web_contents_helper.h" 24@@ -296,6 +301,9 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( 25 std::unique_ptr<MimeHandlerViewGuestDelegate> 26 ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( 27 MimeHandlerViewGuest* guest) const { 28+ if (cef::IsChromeRuntimeEnabled()) { 29+ return std::make_unique<ChromeMimeHandlerViewGuestDelegateCef>(guest); 30+ } 31 return std::make_unique<ChromeMimeHandlerViewGuestDelegate>(); 32 } 33 34