Commit b30e2d76 authored by Tao Bai's avatar Tao Bai Committed by Commit Bot

Add never-attached in devtools WebView description

Bug: 1059071
Change-Id: I6020bb00f73b402fb9a2ea95c11ed656d4aa9b55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2092122Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748399}
parent 11dcad44
...@@ -31,6 +31,7 @@ std::string AwDevToolsManagerDelegate::GetTargetDescription( ...@@ -31,6 +31,7 @@ std::string AwDevToolsManagerDelegate::GetTargetDescription(
return ""; return "";
base::DictionaryValue description; base::DictionaryValue description;
description.SetBoolean("attached", bvr->attached_to_window()); description.SetBoolean("attached", bvr->attached_to_window());
description.SetBoolean("never_attached", !bvr->was_attached());
description.SetBoolean("visible", bvr->IsVisible()); description.SetBoolean("visible", bvr->IsVisible());
gfx::Rect screen_rect = bvr->GetScreenRect(); gfx::Rect screen_rect = bvr->GetScreenRect();
description.SetInteger("screenX", screen_rect.x()); description.SetInteger("screenX", screen_rect.x());
......
...@@ -117,6 +117,7 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient, ...@@ -117,6 +117,7 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient,
bool IsVisible() const; bool IsVisible() const;
gfx::Rect GetScreenRect() const; gfx::Rect GetScreenRect() const;
bool attached_to_window() const { return attached_to_window_; } bool attached_to_window() const { return attached_to_window_; }
bool was_attached() const { return was_attached_; }
gfx::Size size() const { return size_; } gfx::Size size() const { return size_; }
bool IsClientVisible() const; bool IsClientVisible() const;
......
...@@ -573,6 +573,9 @@ function addWebViewDescription(row, webview) { ...@@ -573,6 +573,9 @@ function addWebViewDescription(row, webview) {
} else { } else {
viewStatus.visibility = 'empty'; viewStatus.visibility = 'empty';
} }
if (webview.never_attached) {
viewStatus.visibility += ' never-attached';
}
if (webview.attached) { if (webview.attached) {
viewStatus.position = viewStatus.position =
'at (' + webview.screenX + ', ' + webview.screenY + ')'; 'at (' + webview.screenX + ', ' + webview.screenY + ')';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment