Browse Source

Revert "fix: check guest view's devtools window size"

This reverts commit 90519c3ac07c5a4a682f13a1e625b1ffb51f5f76.

It was an accidencal push
Cheng Zhao 6 years ago
parent
commit
b23c389f89
1 changed files with 3 additions and 1 deletions
  1. 3 1
      brightray/browser/inspectable_web_contents_impl.cc

+ 3 - 1
brightray/browser/inspectable_web_contents_impl.cc

@@ -215,6 +215,8 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
       is_guest_(is_guest),
       view_(CreateInspectableContentsView(this)),
       weak_factory_(this) {
+  if (is_guest)
+    return;
   auto* bounds_dict = pref_service_->GetDictionary(kDevToolsBoundsPref);
   if (bounds_dict) {
     DictionaryToRect(*bounds_dict, &devtools_bounds_);
@@ -225,7 +227,7 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
     }
     if (!IsPointInScreen(devtools_bounds_.origin())) {
       gfx::Rect display;
-      if (!is_guest && web_contents->GetNativeView()) {
+      if (web_contents->GetNativeView()) {
         display = display::Screen::GetScreen()
                       ->GetDisplayNearestView(web_contents->GetNativeView())
                       .bounds();