Set up a native screen on Windows
This is needed to prevent a crash inside aura::WindowTreeHost::InitCompositor.
This commit is contained in:
parent
a1cf58f811
commit
6bae1f4b44
1 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,8 @@
|
||||||
#include "browser/browser_context.h"
|
#include "browser/browser_context.h"
|
||||||
#include "browser/web_ui_controller_factory.h"
|
#include "browser/web_ui_controller_factory.h"
|
||||||
#include "net/proxy/proxy_resolver_v8.h"
|
#include "net/proxy/proxy_resolver_v8.h"
|
||||||
|
#include "ui/gfx/screen.h"
|
||||||
|
#include "ui/views/widget/desktop_aura/desktop_screen.h"
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
|
||||||
|
@ -24,6 +26,10 @@ void BrowserMainParts::PreMainMessageLoopRun() {
|
||||||
new WebUIControllerFactory(browser_context_.get()));
|
new WebUIControllerFactory(browser_context_.get()));
|
||||||
content::WebUIControllerFactory::RegisterFactory(
|
content::WebUIControllerFactory::RegisterFactory(
|
||||||
web_ui_controller_factory_.get());
|
web_ui_controller_factory_.get());
|
||||||
|
|
||||||
|
#if defined(OS_WIN)
|
||||||
|
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserMainParts::PostMainMessageLoopRun() {
|
void BrowserMainParts::PostMainMessageLoopRun() {
|
||||||
|
|
Loading…
Reference in a new issue