diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index bf5908568a50..96725e4b6019 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -591,7 +591,7 @@ bool IsDevToolsFileSystemAdded(content::WebContents* web_contents, #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) -WebContents::Type GetTypeFromViewType(extensions::ViewType view_type) { +WebContents::Type GetTypeFromViewType(extensions::mojom::ViewType view_type) { switch (view_type) { case extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: return WebContents::Type::kBackgroundPage; @@ -625,7 +625,7 @@ WebContents::WebContents(v8::Isolate* isolate, { #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) // WebContents created by extension host will have valid ViewType set. - extensions::ViewType view_type = extensions::GetViewType(web_contents); + extensions::mojom::ViewType view_type = extensions::GetViewType(web_contents); if (view_type != extensions::VIEW_TYPE_INVALID) { InitWithExtensionView(isolate, web_contents, view_type); } @@ -865,7 +865,7 @@ void WebContents::InitWithSessionAndOptions( #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) void WebContents::InitWithExtensionView(v8::Isolate* isolate, content::WebContents* web_contents, - extensions::ViewType view_type) { + extensions::mojom::ViewType view_type) { // Must reassign type prior to calling `Init`. type_ = GetTypeFromViewType(view_type); if (GetType() == Type::kRemote) diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index a490ba6f94ec..639de8f3b086 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -48,7 +48,7 @@ #endif #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) -#include "extensions/common/view_type.h" +#include "extensions/common/mojom/view_type.mojom.h" namespace extensions { class ScriptExecutor; @@ -453,7 +453,7 @@ class WebContents : public gin::Wrappable, #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) void InitWithExtensionView(v8::Isolate* isolate, content::WebContents* web_contents, - extensions::ViewType view_type); + extensions::mojom::ViewType view_type); #endif // content::WebContentsDelegate: