Pass OnPaint callback in constructor
This can catch the paint events happened before onload event.
This commit is contained in:
parent
32d9382417
commit
530fcc8de1
5 changed files with 21 additions and 29 deletions
|
@ -15,12 +15,12 @@ namespace atom {
|
|||
class OffScreenWebContentsView : public content::WebContentsView,
|
||||
public content::RenderViewHostDelegateView {
|
||||
public:
|
||||
explicit OffScreenWebContentsView(bool transparent);
|
||||
OffScreenWebContentsView(bool transparent, const OnPaintCallback& callback);
|
||||
~OffScreenWebContentsView();
|
||||
|
||||
void SetWebContents(content::WebContents*);
|
||||
|
||||
// content::WebContentsView
|
||||
// content::WebContentsView:
|
||||
gfx::NativeView GetNativeView() const override;
|
||||
gfx::NativeView GetContentNativeView() const override;
|
||||
gfx::NativeWindow GetTopLevelNativeWindow() const override;
|
||||
|
@ -62,6 +62,7 @@ class OffScreenWebContentsView : public content::WebContentsView,
|
|||
|
||||
private:
|
||||
const bool transparent_;
|
||||
OnPaintCallback callback_;
|
||||
|
||||
// Weak refs.
|
||||
OffScreenRenderWidgetHostView* view_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue