Show dummy view under offscreen mode

This commit is contained in:
Cheng Zhao 2016-08-04 15:34:29 +09:00
parent 64334fd40b
commit 41df037f64
4 changed files with 78 additions and 0 deletions

View file

@ -10,6 +10,14 @@
#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/web_contents.h"
#if defined(OS_MACOSX)
#ifdef __OBJC__
@class OffScreenView;
#else
class OffScreenView;
#endif
#endif
namespace atom {
class OffScreenWebContentsView : public content::WebContentsView,
@ -61,12 +69,21 @@ class OffScreenWebContentsView : public content::WebContentsView,
void UpdateDragCursor(blink::WebDragOperation operation) override;
private:
#if defined(OS_MACOSX)
void PlatformCreate();
void PlatformDestroy();
#endif
const bool transparent_;
OnPaintCallback callback_;
// Weak refs.
OffScreenRenderWidgetHostView* view_;
content::WebContents* web_contents_;
#if defined(OS_MACOSX)
OffScreenView* offScreenView_;
#endif
};
} // namespace atom