diff --git a/brightray/brightray.gyp b/brightray/brightray.gyp index 4de2f5259a93..d089dbaceb8e 100644 --- a/brightray/brightray.gyp +++ b/brightray/brightray.gyp @@ -24,11 +24,13 @@ '.', '..', '<(libchromiumcontent_src_dir)', + '<(libchromiumcontent_src_dir)/gpu', '<(libchromiumcontent_src_dir)/skia/config', '<(libchromiumcontent_src_dir)/third_party/skia/include/core', '<(libchromiumcontent_src_dir)/third_party/skia/include/config', '<(libchromiumcontent_src_dir)/third_party/icu/source/common', '<(libchromiumcontent_src_dir)/third_party/mojo/src', + '<(libchromiumcontent_src_dir)/third_party/khronos', '<(libchromiumcontent_src_dir)/third_party/WebKit', '<(libchromiumcontent_dir)/gen', ], diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 210a69392e2d..a83a9d8b2a86 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -221,8 +221,14 @@ InspectableWebContentsImpl::InspectableWebContentsImpl( devtools_bounds_.set_width(800); } if (!IsPointInScreen(devtools_bounds_.origin())) { - gfx::Rect display = display::Screen::GetScreen()-> + gfx::Rect display; + if (web_contents->GetNativeView()) { + display = display::Screen::GetScreen()-> GetDisplayNearestWindow(web_contents->GetNativeView()).bounds(); + } else { + display = display::Screen::GetScreen()->GetPrimaryDisplay().bounds(); + } + devtools_bounds_.set_x(display.x() + (display.width() - devtools_bounds_.width()) / 2); devtools_bounds_.set_y(display.y() + (display.height() - devtools_bounds_.height()) / 2); }