[Extensions] Fix some issues with the ENABLE_GUEST_VIEW build flag.
ExtensionsApiClient has some virtual functions controlled by this flag. Unfortunately, the derived classes implement overrides and these declarations and definitions aren't controlled by this flag, which leads to compilation errors. This CL adds the necessary ifdef blocks. Bug: 356671305 Change-Id: I285e6dd8fdb9a56a79db4c22deb68f6c55e7c750 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6394592 Reviewed-by: Justin Lulejian <jlulejian@chromium.org> Commit-Queue: David Bertoni <dbertoni@chromium.org> Auto-Submit: David Bertoni <dbertoni@chromium.org> Cr-Commit-Position: refs/heads/main@{#1439669}
This commit is contained in:
parent
47d1354366
commit
139ea1511f
chrome/browser/extensions/api
extensions/shell/browser
@ -290,6 +290,7 @@ void ChromeExtensionsAPIClient::OpenFileUrl(
|
||||
Navigate(&navigate_params);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
AppViewGuestDelegate* ChromeExtensionsAPIClient::CreateAppViewGuestDelegate()
|
||||
const {
|
||||
return new ChromeAppViewGuestDelegate();
|
||||
@ -322,6 +323,7 @@ ChromeExtensionsAPIClient::CreateWebViewPermissionHelperDelegate(
|
||||
WebViewPermissionHelper* web_view_permission_helper) const {
|
||||
return new ChromeWebViewPermissionHelperDelegate(web_view_permission_helper);
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
std::unique_ptr<ConsentProvider>
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define CHROME_BROWSER_EXTENSIONS_API_CHROME_EXTENSIONS_API_CLIENT_H_
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "extensions/browser/api/extensions_api_client.h"
|
||||
|
||||
@ -52,6 +53,7 @@ class ChromeExtensionsAPIClient : public ExtensionsAPIClient {
|
||||
const Extension& extension) override;
|
||||
void OpenFileUrl(const GURL& file_url,
|
||||
content::BrowserContext* browser_context) override;
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
AppViewGuestDelegate* CreateAppViewGuestDelegate() const override;
|
||||
ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate(
|
||||
ExtensionOptionsGuest* guest) const override;
|
||||
@ -64,6 +66,7 @@ class ChromeExtensionsAPIClient : public ExtensionsAPIClient {
|
||||
WebViewGuest* web_view_guest) const override;
|
||||
WebViewPermissionHelperDelegate* CreateWebViewPermissionHelperDelegate(
|
||||
WebViewPermissionHelper* web_view_permission_helper) const override;
|
||||
#endif // BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
std::unique_ptr<ConsentProvider> CreateConsentProvider(
|
||||
content::BrowserContext* browser_context) const override;
|
||||
|
@ -33,6 +33,7 @@ void ShellExtensionsAPIClient::AttachWebContentsHelpers(
|
||||
ShellExtensionWebContentsObserver::CreateForWebContents(web_contents);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
AppViewGuestDelegate* ShellExtensionsAPIClient::CreateAppViewGuestDelegate()
|
||||
const {
|
||||
return new ShellAppViewGuestDelegate();
|
||||
@ -42,6 +43,7 @@ WebViewGuestDelegate* ShellExtensionsAPIClient::CreateWebViewGuestDelegate(
|
||||
WebViewGuest* web_view_guest) const {
|
||||
return new ShellWebViewGuestDelegate();
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
|
||||
std::unique_ptr<VirtualKeyboardDelegate>
|
||||
ShellExtensionsAPIClient::CreateVirtualKeyboardDelegate(
|
||||
|
@ -27,9 +27,11 @@ class ShellExtensionsAPIClient : public ExtensionsAPIClient {
|
||||
// ExtensionsAPIClient implementation.
|
||||
void AttachWebContentsHelpers(content::WebContents* web_contents) const
|
||||
override;
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
AppViewGuestDelegate* CreateAppViewGuestDelegate() const override;
|
||||
WebViewGuestDelegate* CreateWebViewGuestDelegate(
|
||||
WebViewGuest* web_view_guest) const override;
|
||||
#endif // BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
std::unique_ptr<VirtualKeyboardDelegate> CreateVirtualKeyboardDelegate(
|
||||
content::BrowserContext* browser_context) const override;
|
||||
std::unique_ptr<DisplayInfoProvider> CreateDisplayInfoProvider()
|
||||
|
Loading…
x
Reference in New Issue
Block a user