Interface CefContextMenuParams


  • public interface CefContextMenuParams
    Provides information about the context menu state. The methods of this class can only be accessed on browser process the UI thread.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean getDictionarySuggestions​(java.util.Vector<java.lang.String> suggestions)
      Returns true if suggestions exist, false otherwise.
      int getEditStateFlags()
      Returns flags representing the actions supported by the editable node, if any, that the context menu was invoked on.
      java.lang.String getFrameCharset()
      Returns the character encoding of the subframe that the context menu was invoked on.
      java.lang.String getFrameUrl()
      Returns the URL of the subframe that the context menu was invoked on.
      java.lang.String getLinkUrl()
      Returns the URL of the link, if any, that encloses the node that the context menu was invoked on.
      int getMediaStateFlags()
      Returns flags representing the actions supported by the media element, if any, that the context menu was invoked on.
      CefContextMenuParams.MediaType getMediaType()
      Returns the type of context node that the context menu was invoked on.
      java.lang.String getMisspelledWord()
      Returns the text of the misspelled word, if any, that the context menu was invoked on.
      java.lang.String getPageUrl()
      Returns the URL of the top level page that the context menu was invoked on.
      java.lang.String getSelectionText()
      Returns the text of the selection, if any, that the context menu was invoked on.
      java.lang.String getSourceUrl()
      Returns the source URL, if any, for the element that the context menu was invoked on.
      int getTypeFlags()
      Returns flags representing the type of node that the context menu was invoked on.
      java.lang.String getUnfilteredLinkUrl()
      Returns the link URL, if any, to be used ONLY for "copy link address".
      int getXCoord()
      Returns the X coordinate of the mouse where the context menu was invoked.
      int getYCoord()
      Returns the Y coordinate of the mouse where the context menu was invoked.
      boolean hasImageContents()
      Returns true if the context menu was invoked on an image which has non-empty contents.
      boolean isEditable()
      Returns true if the context menu was invoked on an editable node.
      boolean isSpellCheckEnabled()
      Returns true if the context menu was invoked on an editable node where spell-check is enabled.
    • Method Detail

      • getXCoord

        int getXCoord()
        Returns the X coordinate of the mouse where the context menu was invoked. Coords are relative to the associated RenderView's origin.
      • getYCoord

        int getYCoord()
        Returns the Y coordinate of the mouse where the context menu was invoked. Coords are relative to the associated RenderView's origin.
      • getTypeFlags

        int getTypeFlags()
        Returns flags representing the type of node that the context menu was invoked on. See TypeFlags for supported values
      • getLinkUrl

        java.lang.String getLinkUrl()
        Returns the URL of the link, if any, that encloses the node that the context menu was invoked on.
      • getUnfilteredLinkUrl

        java.lang.String getUnfilteredLinkUrl()
        Returns the link URL, if any, to be used ONLY for "copy link address". We don't validate this field in the frontend process.
      • getSourceUrl

        java.lang.String getSourceUrl()
        Returns the source URL, if any, for the element that the context menu was invoked on. Example of elements with source URLs are img, audio, and video.
      • hasImageContents

        boolean hasImageContents()
        Returns true if the context menu was invoked on an image which has non-empty contents.
      • getPageUrl

        java.lang.String getPageUrl()
        Returns the URL of the top level page that the context menu was invoked on.
      • getFrameUrl

        java.lang.String getFrameUrl()
        Returns the URL of the subframe that the context menu was invoked on.
      • getFrameCharset

        java.lang.String getFrameCharset()
        Returns the character encoding of the subframe that the context menu was invoked on.
      • getMediaStateFlags

        int getMediaStateFlags()
        Returns flags representing the actions supported by the media element, if any, that the context menu was invoked on. See MediaStateFlags for possible values.
      • getSelectionText

        java.lang.String getSelectionText()
        Returns the text of the selection, if any, that the context menu was invoked on.
      • getMisspelledWord

        java.lang.String getMisspelledWord()
        Returns the text of the misspelled word, if any, that the context menu was invoked on.
      • getDictionarySuggestions

        boolean getDictionarySuggestions​(java.util.Vector<java.lang.String> suggestions)
        Returns true if suggestions exist, false otherwise. Fills in |suggestions| from the spell check service for the misspelled word if there is one.
      • isEditable

        boolean isEditable()
        Returns true if the context menu was invoked on an editable node.
      • isSpellCheckEnabled

        boolean isSpellCheckEnabled()
        Returns true if the context menu was invoked on an editable node where spell-check is enabled.
      • getEditStateFlags

        int getEditStateFlags()
        Returns flags representing the actions supported by the editable node, if any, that the context menu was invoked on. See EditStateFlags for possible values.