@@ -12,37 +12,119 @@ namespace CefSharp
1212 /// </summary>
1313 public interface IContextMenuParams : IDisposable
1414 {
15+ /// <summary>
16+ /// Returns the Y coordinate of the mouse where the context menu was invoked.
17+ /// Coords are relative to the associated RenderView's origin.
18+ /// </summary>
1519 int YCoord { get ; }
20+
21+ /// <summary>
22+ /// Returns the X coordinate of the mouse where the context menu was invoked.
23+ /// Coords are relative to the associated RenderView's origin.
24+ /// </summary>
1625 int XCoord { get ; }
1726
18- // TODO: Implement:
19- //virtual TypeFlags GetTypeFlags() OVERRIDE;
27+ /// <summary>
28+ /// Returns flags representing the type of node that the context menu was invoked on.
29+ /// </summary>
30+ ContextMenuType TypeFlags { get ; }
2031
32+ /// <summary>
33+ /// Returns the URL of the link, if any, that encloses the node that the
34+ /// context menu was invoked on.
35+ /// </summary>
2136 string LinkUrl { get ; }
37+
38+ /// <summary>
39+ /// Returns the link URL, if any, to be used ONLY for "copy link address". We
40+ /// don't validate this field in the frontend process.
41+ /// </summary>
2242 string UnfilteredLinkUrl { get ; }
43+
44+ /// <summary>
45+ /// Returns the source URL, if any, for the element that the context menu was
46+ /// invoked on. Example of elements with source URLs are img, audio, and video.
47+ /// </summary>
2348 string SourceUrl { get ; }
49+
50+ /// <summary>
51+ /// Returns true if the context menu was invoked on an image which has
52+ /// non-empty contents.
53+ /// </summary>
2454 bool HasImageContents { get ; }
55+
56+ /// <summary>
57+ /// Returns the URL of the top level page that the context menu was invoked on.
58+ /// </summary>
2559 string PageUrl { get ; }
60+
61+ /// <summary>
62+ /// Returns the URL of the subframe that the context menu was invoked on.
63+ /// </summary>
2664 string FrameUrl { get ; }
65+
66+ /// <summary>
67+ /// Returns the character encoding of the subframe that the context menu was
68+ /// invoked on.
69+ /// </summary>
2770 string FrameCharset { get ; }
2871
72+ /// <summary>
73+ /// Returns the type of context node that the context menu was invoked on.
74+ /// </summary>
75+ ContextMenuMediaType MediaType { get ; }
76+
77+ /// <summary>
78+ /// Returns flags representing the actions supported by the media element, if
79+ /// any, that the context menu was invoked on.
80+ /// </summary>
81+ ContextMenuMediaState MediaStateFlags { get ; }
2982
30- // TODO: Implement:
31- //virtual MediaType GetMediaType() OVERRIDE;
32- //virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
33-
34-
83+ /// <summary>
84+ /// Returns the text of the selection, if any, that the context menu was
85+ /// invoked on.
86+ /// </summary>
3587 string SelectionText { get ; }
88+
89+ /// <summary>
90+ /// Returns the text of the misspelled word, if any, that the context menu was
91+ /// invoked on.
92+ /// </summary>
3693 string MisspelledWord { get ; }
3794
95+ /// <summary>
96+ /// Returns a list of strings from the spell check service for the misspelled word if there is one.
97+ /// </summary>
3898 List < string > DictionarySuggestions { get ; }
3999
100+ /// <summary>
101+ /// Returns true if the context menu was invoked on an editable node.
102+ /// </summary>
40103 bool IsEditable { get ; }
104+
105+ /// <summary>
106+ /// Returns true if the context menu was invoked on an editable node where
107+ /// spell-check is enabled.
108+ /// </summary>
41109 bool IsSpellCheckEnabled { get ; }
42-
43110
44- // TODO: Implement:
45- //virtual EditStateFlags GetEditStateFlags() OVERRIDE;
111+ /// <summary>
112+ /// Returns flags representing the actions supported by the editable node, if
113+ /// any, that the context menu was invoked on.
114+ /// </summary>
115+ /// <returns>Returns ContextMenuEditState as flags</returns>
116+ ContextMenuEditState EditStateFlags { get ; }
117+
118+ /// <summary>
119+ /// Returns true if the context menu contains items specified by the renderer
120+ /// process (for example, plugin placeholder or pepper plugin menu items).
121+ /// </summary>
122+ bool IsCustomMenu { get ; }
123+
124+ /// <summary>
125+ /// Returns true if the context menu was invoked from a pepper plugin.
126+ /// </summary>
127+ bool IsPepperMenu { get ; }
46128
47129 /// <summary>
48130 /// Gets a value indicating whether the object has been disposed of.
0 commit comments