build: define compile time features with buildflag header (#14840)
* build: define compile time features with buildflag header * refactor: switch to BUILDFLAG(ENABLE_DESKTOP_CAPTURER) * refactor: switch to BUILDFLAG(ENABLE_RUN_AS_NODE) * refactor: switch to BUILDFLAG(ENABLE_OSR) * refactor: switch to BUILDFLAG(ENABLE_VIEW_API) * refactor: switch to BUILDFLAG(ENABLE_PEPPER_FLASH) * refactor: switch to BUILDFLAG(OVERRIDE_LOCATION_PROVIDER) * refactor: switch to BUILDFLAG(ENABLE_PDF_VIEWER)
This commit is contained in:
parent
4af922c9a2
commit
a24ad6bc14
31 changed files with 172 additions and 209 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "content/public/common/favicon_url.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "native_mate/handle.h"
|
||||
#include "printing/backend/print_backend.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
@ -49,7 +50,7 @@ class WebContentsZoomController;
|
|||
class WebViewGuestDelegate;
|
||||
class FrameSubscriber;
|
||||
|
||||
#if defined(ENABLE_OSR)
|
||||
#if BUILDFLAG(ENABLE_OSR)
|
||||
class OffScreenWebContentsView;
|
||||
class OffScreenRenderWidgetHostView;
|
||||
#endif
|
||||
|
@ -208,12 +209,14 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
|
||||
// Methods for offscreen rendering
|
||||
bool IsOffScreen() const;
|
||||
#if BUILDFLAG(ENABLE_OSR)
|
||||
void OnPaint(const gfx::Rect& dirty_rect, const SkBitmap& bitmap);
|
||||
void StartPainting();
|
||||
void StopPainting();
|
||||
bool IsPainting() const;
|
||||
void SetFrameRate(int frame_rate);
|
||||
int GetFrameRate() const;
|
||||
#endif
|
||||
void Invalidate();
|
||||
gfx::Size GetSizeForNewRenderView(content::WebContents*) const override;
|
||||
|
||||
|
@ -416,7 +419,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
|
||||
uint32_t GetNextRequestId() { return ++request_id_; }
|
||||
|
||||
#if defined(ENABLE_OSR)
|
||||
#if BUILDFLAG(ENABLE_OSR)
|
||||
OffScreenWebContentsView* GetOffScreenWebContentsView() const;
|
||||
OffScreenRenderWidgetHostView* GetOffScreenRenderWidgetHostView() const;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue