Implement GetScreenInfo

This commit is contained in:
Kevin Sawicki 2016-12-19 17:23:41 -08:00 committed by Birunthan Mohanathas
parent 39ddeff5c3
commit d71f10c5a3
2 changed files with 12 additions and 0 deletions

View file

@ -4,6 +4,8 @@
#include "atom/browser/osr/osr_web_contents_view.h"
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
namespace atom {
OffScreenWebContentsView::OffScreenWebContentsView(
@ -108,6 +110,14 @@ void OffScreenWebContentsView::SetOverscrollControllerEnabled(bool enabled) {
void OffScreenWebContentsView::GetScreenInfo(
blink::WebScreenInfo* web_screen_info) const {
web_screen_info->rect = gfx::Rect(view_->size());
web_screen_info->availableRect = gfx::Rect(view_->size());
web_screen_info->depth = 24;
web_screen_info->depthPerComponent = 8;
web_screen_info->deviceScaleFactor = view_->scale_factor();
web_screen_info->orientationAngle = 0;
web_screen_info->orientationType =
blink::WebScreenOrientationLandscapePrimary;
}
#if defined(OS_MACOSX)