fix: build failure when printing is disabled (#46283)
fix: ftbfs when printing is disabled
This commit is contained in:
parent
6e44662f15
commit
48a38c0289
3 changed files with 6 additions and 1 deletions
|
@ -1988,6 +1988,7 @@ void WebContents::DraggableRegionsChanged(
|
||||||
draggable_region_ = DraggableRegionsToSkRegion(regions);
|
draggable_region_ = DraggableRegionsToSkRegion(regions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if BUILDFLAG(ENABLE_PRINTING)
|
||||||
void WebContents::PrintCrossProcessSubframe(
|
void WebContents::PrintCrossProcessSubframe(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
const gfx::Rect& rect,
|
const gfx::Rect& rect,
|
||||||
|
@ -1998,6 +1999,7 @@ void WebContents::PrintCrossProcessSubframe(
|
||||||
client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
|
client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SkRegion* WebContents::draggable_region() {
|
SkRegion* WebContents::draggable_region() {
|
||||||
return g_disable_draggable_regions ? nullptr : draggable_region_.get();
|
return g_disable_draggable_regions ? nullptr : draggable_region_.get();
|
||||||
|
|
|
@ -585,11 +585,13 @@ class WebContents final : public ExclusiveAccessContext,
|
||||||
void DraggableRegionsChanged(
|
void DraggableRegionsChanged(
|
||||||
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
||||||
content::WebContents* contents) override;
|
content::WebContents* contents) override;
|
||||||
|
#if BUILDFLAG(ENABLE_PRINTING)
|
||||||
void PrintCrossProcessSubframe(
|
void PrintCrossProcessSubframe(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
const gfx::Rect& rect,
|
const gfx::Rect& rect,
|
||||||
int document_cookie,
|
int document_cookie,
|
||||||
content::RenderFrameHost* subframe_host) const override;
|
content::RenderFrameHost* subframe_host) const override;
|
||||||
|
#endif
|
||||||
|
|
||||||
// content::WebContentsObserver:
|
// content::WebContentsObserver:
|
||||||
void BeforeUnloadFired(bool proceed) override;
|
void BeforeUnloadFired(bool proceed) override;
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
#include "media/base/media_switches.h"
|
#include "media/base/media_switches.h"
|
||||||
#include "net/base/features.h"
|
#include "net/base/features.h"
|
||||||
|
#include "printing/buildflags/buildflags.h"
|
||||||
#include "services/network/public/cpp/features.h"
|
#include "services/network/public/cpp/features.h"
|
||||||
#include "third_party/blink/public/common/features.h"
|
#include "third_party/blink/public/common/features.h"
|
||||||
|
|
||||||
|
@ -60,7 +61,7 @@ void InitializeFeatureList() {
|
||||||
std::string(",") + features::kMacWebContentsOcclusion.name;
|
std::string(",") + features::kMacWebContentsOcclusion.name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BUILDFLAG(IS_LINUX)
|
#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING)
|
||||||
disable_features +=
|
disable_features +=
|
||||||
// EnableOopPrintDrivers is still a bit half-baked on Linux and
|
// EnableOopPrintDrivers is still a bit half-baked on Linux and
|
||||||
// causes crashes when trying to show dialogs.
|
// causes crashes when trying to show dialogs.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue