Set up a native screen on Windows

This is needed to prevent a crash inside aura::WindowTreeHost::InitCompositor.
This commit is contained in:
Adam Roben 2014-07-07 13:53:24 -04:00
parent a1cf58f811
commit 6bae1f4b44

View file

@ -7,6 +7,8 @@
#include "browser/browser_context.h"
#include "browser/web_ui_controller_factory.h"
#include "net/proxy/proxy_resolver_v8.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/desktop_aura/desktop_screen.h"
namespace brightray {
@ -24,6 +26,10 @@ void BrowserMainParts::PreMainMessageLoopRun() {
new WebUIControllerFactory(browser_context_.get()));
content::WebUIControllerFactory::RegisterFactory(
web_ui_controller_factory_.get());
#if defined(OS_WIN)
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
#endif
}
void BrowserMainParts::PostMainMessageLoopRun() {