Class OverlayImpl

java.lang.Object
io.webfolder.cdp.command.OverlayImpl
All Implemented Interfaces:
Overlay

public class OverlayImpl
extends java.lang.Object
implements Overlay
  • Constructor Summary

    Constructors 
    Constructor Description
    OverlayImpl​(SessionInvocationHandler handler)  
  • Method Summary

    Modifier and Type Method Description
    void disable()
    Disables domain notifications.
    void enable()
    Enables domain notifications.
    void hideHighlight()
    Hides any highlight.
    void highlightFrame​(java.lang.String frameId)
    Highlights owner element of the frame with given id.
    void highlightFrame​(java.lang.String frameId, RGBA contentColor, RGBA contentOutlineColor)
    Highlights owner element of the frame with given id.
    void highlightNode​(HighlightConfig highlightConfig)
    Highlights DOM node with given id or with the given JavaScript object wrapper.
    void highlightNode​(HighlightConfig highlightConfig, java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId, java.lang.String selector)
    Highlights DOM node with given id or with the given JavaScript object wrapper.
    void highlightQuad​(java.util.List<java.lang.Double> quad)
    Highlights given quad.
    void highlightQuad​(java.util.List<java.lang.Double> quad, RGBA color, RGBA outlineColor)
    Highlights given quad.
    void highlightRect​(java.lang.Integer x, java.lang.Integer y, java.lang.Integer width, java.lang.Integer height)
    Highlights given rectangle.
    void highlightRect​(java.lang.Integer x, java.lang.Integer y, java.lang.Integer width, java.lang.Integer height, RGBA color, RGBA outlineColor)
    Highlights given rectangle.
    void setInspectMode​(InspectMode mode)
    Enters the 'inspect' mode.
    void setInspectMode​(InspectMode mode, HighlightConfig highlightConfig)
    Enters the 'inspect' mode.
    void setPausedInDebuggerMessage()  
    void setPausedInDebuggerMessage​(java.lang.String message)  
    void setShowAdHighlights​(java.lang.Boolean show)
    Highlights owner element of all frames detected to be ads.
    void setShowDebugBorders​(java.lang.Boolean show)
    Requests that backend shows debug borders on layers
    void setShowFPSCounter​(java.lang.Boolean show)
    Requests that backend shows the FPS counter
    void setShowHitTestBorders​(java.lang.Boolean show)
    Requests that backend shows hit-test borders on layers
    void setShowLayoutShiftRegions​(java.lang.Boolean result)
    Requests that backend shows layout shift regions
    void setShowPaintRects​(java.lang.Boolean result)
    Requests that backend shows paint rectangles
    void setShowScrollBottleneckRects​(java.lang.Boolean show)
    Requests that backend shows scroll bottleneck rects
    void setShowViewportSizeOnResize​(java.lang.Boolean show)
    Paints viewport size upon main frame resize.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • disable

      public void disable()
      Description copied from interface: Overlay
      Disables domain notifications.
      Specified by:
      disable in interface Overlay
    • enable

      public void enable()
      Description copied from interface: Overlay
      Enables domain notifications.
      Specified by:
      enable in interface Overlay
    • hideHighlight

      public void hideHighlight()
      Description copied from interface: Overlay
      Hides any highlight.
      Specified by:
      hideHighlight in interface Overlay
    • highlightFrame

      public void highlightFrame​(java.lang.String frameId, RGBA contentColor, RGBA contentOutlineColor)
      Description copied from interface: Overlay
      Highlights owner element of the frame with given id.
      Specified by:
      highlightFrame in interface Overlay
      Parameters:
      frameId - Identifier of the frame to highlight.
      contentColor - The content box highlight fill color (default: transparent).
      contentOutlineColor - The content box highlight outline color (default: transparent).
    • highlightNode

      public void highlightNode​(HighlightConfig highlightConfig, java.lang.Integer nodeId, java.lang.Integer backendNodeId, java.lang.String objectId, java.lang.String selector)
      Description copied from interface: Overlay
      Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
      Specified by:
      highlightNode in interface Overlay
      Parameters:
      highlightConfig - A descriptor for the highlight appearance.
      nodeId - Identifier of the node to highlight.
      backendNodeId - Identifier of the backend node to highlight.
      objectId - JavaScript object id of the node to be highlighted.
      selector - Selectors to highlight relevant nodes.
    • highlightQuad

      public void highlightQuad​(java.util.List<java.lang.Double> quad, RGBA color, RGBA outlineColor)
      Description copied from interface: Overlay
      Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
      Specified by:
      highlightQuad in interface Overlay
      Parameters:
      quad - Quad to highlight
      color - The highlight fill color (default: transparent).
      outlineColor - The highlight outline color (default: transparent).
    • highlightRect

      public void highlightRect​(java.lang.Integer x, java.lang.Integer y, java.lang.Integer width, java.lang.Integer height, RGBA color, RGBA outlineColor)
      Description copied from interface: Overlay
      Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
      Specified by:
      highlightRect in interface Overlay
      Parameters:
      x - X coordinate
      y - Y coordinate
      width - Rectangle width
      height - Rectangle height
      color - The highlight fill color (default: transparent).
      outlineColor - The highlight outline color (default: transparent).
    • setInspectMode

      public void setInspectMode​(InspectMode mode, HighlightConfig highlightConfig)
      Description copied from interface: Overlay
      Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.
      Specified by:
      setInspectMode in interface Overlay
      Parameters:
      mode - Set an inspection mode.
      highlightConfig - A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled == false`.
    • setShowAdHighlights

      public void setShowAdHighlights​(java.lang.Boolean show)
      Description copied from interface: Overlay
      Highlights owner element of all frames detected to be ads.
      Specified by:
      setShowAdHighlights in interface Overlay
      Parameters:
      show - True for showing ad highlights
    • setPausedInDebuggerMessage

      public void setPausedInDebuggerMessage​(java.lang.String message)
      Specified by:
      setPausedInDebuggerMessage in interface Overlay
    • setShowDebugBorders

      public void setShowDebugBorders​(java.lang.Boolean show)
      Description copied from interface: Overlay
      Requests that backend shows debug borders on layers
      Specified by:
      setShowDebugBorders in interface Overlay
      Parameters:
      show - True for showing debug borders
    • setShowFPSCounter

      public void setShowFPSCounter​(java.lang.Boolean show)
      Description copied from interface: Overlay
      Requests that backend shows the FPS counter
      Specified by:
      setShowFPSCounter in interface Overlay
      Parameters:
      show - True for showing the FPS counter
    • setShowPaintRects

      public void setShowPaintRects​(java.lang.Boolean result)
      Description copied from interface: Overlay
      Requests that backend shows paint rectangles
      Specified by:
      setShowPaintRects in interface Overlay
      Parameters:
      result - True for showing paint rectangles
    • setShowLayoutShiftRegions

      public void setShowLayoutShiftRegions​(java.lang.Boolean result)
      Description copied from interface: Overlay
      Requests that backend shows layout shift regions
      Specified by:
      setShowLayoutShiftRegions in interface Overlay
      Parameters:
      result - True for showing layout shift regions
    • setShowScrollBottleneckRects

      public void setShowScrollBottleneckRects​(java.lang.Boolean show)
      Description copied from interface: Overlay
      Requests that backend shows scroll bottleneck rects
      Specified by:
      setShowScrollBottleneckRects in interface Overlay
      Parameters:
      show - True for showing scroll bottleneck rects
    • setShowHitTestBorders

      public void setShowHitTestBorders​(java.lang.Boolean show)
      Description copied from interface: Overlay
      Requests that backend shows hit-test borders on layers
      Specified by:
      setShowHitTestBorders in interface Overlay
      Parameters:
      show - True for showing hit-test borders
    • setShowViewportSizeOnResize

      public void setShowViewportSizeOnResize​(java.lang.Boolean show)
      Description copied from interface: Overlay
      Paints viewport size upon main frame resize.
      Specified by:
      setShowViewportSizeOnResize in interface Overlay
      Parameters:
      show - Whether to paint size or not.
    • highlightFrame

      public void highlightFrame​(java.lang.String frameId)
      Description copied from interface: Overlay
      Highlights owner element of the frame with given id.
      Specified by:
      highlightFrame in interface Overlay
      Parameters:
      frameId - Identifier of the frame to highlight.
    • highlightNode

      public void highlightNode​(HighlightConfig highlightConfig)
      Description copied from interface: Overlay
      Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
      Specified by:
      highlightNode in interface Overlay
      Parameters:
      highlightConfig - A descriptor for the highlight appearance.
    • highlightQuad

      public void highlightQuad​(java.util.List<java.lang.Double> quad)
      Description copied from interface: Overlay
      Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
      Specified by:
      highlightQuad in interface Overlay
      Parameters:
      quad - Quad to highlight
    • highlightRect

      public void highlightRect​(java.lang.Integer x, java.lang.Integer y, java.lang.Integer width, java.lang.Integer height)
      Description copied from interface: Overlay
      Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
      Specified by:
      highlightRect in interface Overlay
      Parameters:
      x - X coordinate
      y - Y coordinate
      width - Rectangle width
      height - Rectangle height
    • setInspectMode

      public void setInspectMode​(InspectMode mode)
      Description copied from interface: Overlay
      Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.
      Specified by:
      setInspectMode in interface Overlay
      Parameters:
      mode - Set an inspection mode.
    • setPausedInDebuggerMessage

      public void setPausedInDebuggerMessage()
      Specified by:
      setPausedInDebuggerMessage in interface Overlay