RenderCoordinates is owned by & sits behind ContentViewCore, providing various view-related size/metric/scale factor. It is either directly exposed via ContentViewCore.getRenderCoordinates() or accessed through CVC by API such as ContentViewCore.getContentWidthCss() by embedders. Having WebContents own the instance will help embedders avoid accessing ContentViewCore.
RenderCoordinates itself can be considered as implementation details, so direct exposure to embedders should be disallowed. I'm considering all the API's it provides to be bridged by WebContents.
- getContentsOffsetYPix
- getContentWidth/HeightCss
- get/setDeviceScaleFactor
- getPageScaleFactor
- fromLocalCssToPix
- getScrollX/YPixInt, etc. See https://cs.chromium.org/chromium/src/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java for all the API's. Otherwise the class needs to be in content_public.
Any feedbacks are welcome.
Comment 1 by jinsuk...@chromium.org
, Oct 10 2017