Commit 60892c9f authored by Tao Bai's avatar Tao Bai Committed by Commit Bot

Add more comments to content_capture_data.h

Change-Id: I5d5a979cb8360341c910288141394e84ebf4e2b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616389Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Reviewed-by: default avatarTao Bai <michaelbai@chromium.org>
Commit-Queue: Tao Bai <michaelbai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663931}
parent 6ce98927
...@@ -15,15 +15,20 @@ namespace content_capture { ...@@ -15,15 +15,20 @@ namespace content_capture {
// This struct defines the on-screen text content and its bounds in a frame, // This struct defines the on-screen text content and its bounds in a frame,
// the text is captured in renderer and sent to browser; the root of // the text is captured in renderer and sent to browser; the root of
// this tree is frame, the child could be the scrollable area or the text // this tree is frame, the child could be the scrollable area or the text
// content. // content, scrollable area can have scrollable area or text as child. Text
// cannot have any child.
struct ContentCaptureData { struct ContentCaptureData {
ContentCaptureData(); ContentCaptureData();
ContentCaptureData(const ContentCaptureData& data); ContentCaptureData(const ContentCaptureData& data);
~ContentCaptureData(); ~ContentCaptureData();
// The id of the frame or the content. // The id of the frame or the content,
// For frame, this will be 0 until ContentCaptureReceiver assigns a unique ID.
int64_t id = 0; int64_t id = 0;
// The url of frame or the text of the content. // The url of frame or the text of the content.
// For frame, this is the URL of the frame.
// For scrollable area, this is not used.
// For text, this is the text value.
base::string16 value; base::string16 value;
// The bounds of the frame or the content. // The bounds of the frame or the content.
gfx::Rect bounds; gfx::Rect bounds;
...@@ -38,6 +43,9 @@ struct ContentCaptureData { ...@@ -38,6 +43,9 @@ struct ContentCaptureData {
}; };
// This defines a session, is a list of frames from current frame to root. // This defines a session, is a list of frames from current frame to root.
// This represents the frame hierarchy, starting from the current frame to the
// root frame, in the upward order. Note that ContentCaptureData here can only
// have URL as value, and no ContentCaptureData has children in it.
using ContentCaptureSession = std::vector<ContentCaptureData>; using ContentCaptureSession = std::vector<ContentCaptureData>;
} // namespace content_capture } // namespace content_capture
......
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