Move OSR api to OsrWCV to allow api calls to take effect sooner

This commit is contained in:
Heilig Benedek 2018-01-25 14:46:30 +01:00
parent 1a8916ed47
commit 406f171c88
6 changed files with 105 additions and 25 deletions

View file

@ -69,6 +69,11 @@ class OffScreenWebContentsView : public content::WebContentsView,
content::RenderWidgetHostImpl* source_rwh) override;
void UpdateDragCursor(blink::WebDragOperation operation) override;
void SetPainting(bool painting);
bool IsPainting() const;
void SetFrameRate(int frame_rate);
int GetFrameRate() const;
private:
#if defined(OS_MACOSX)
void PlatformCreate();
@ -78,6 +83,8 @@ class OffScreenWebContentsView : public content::WebContentsView,
OffScreenRenderWidgetHostView* GetView() const;
const bool transparent_;
bool painting_;
int frame_rate_;
OnPaintCallback callback_;
// Weak refs.