diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/Bounds.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/Bounds.cs new file mode 100644 index 0000000000000000000000000000000000000000..58d0cedb615307413b48e739bc723a12e57987f1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/Bounds.cs @@ -0,0 +1,39 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Browser window bounds information + /// </summary> + [SupportedBy("Chrome")] + public class Bounds + { + /// <summary> + /// Gets or sets The offset from the left edge of the screen to the window in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Left { get; set; } + /// <summary> + /// Gets or sets The offset from the top edge of the screen to the window in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Top { get; set; } + /// <summary> + /// Gets or sets The window width in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Width { get; set; } + /// <summary> + /// Gets or sets The window height in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Height { get; set; } + /// <summary> + /// Gets or sets The window state. Default to normal. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public WindowState WindowState { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f11d41c9647b102d9444a2cae47fb63aedba6d6c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get position and size of the browser window. + /// </summary> + [Command(ProtocolName.Browser.GetWindowBounds)] + [SupportedBy("Chrome")] + public class GetWindowBoundsCommand + { + /// <summary> + /// Gets or sets Browser window id. + /// </summary> + public long WindowId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c7c028be14f16db99b384f5319acb56c13996ec2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get position and size of the browser window. + /// </summary> + [CommandResponse(ProtocolName.Browser.GetWindowBounds)] + [SupportedBy("Chrome")] + public class GetWindowBoundsCommandResponse + { + /// <summary> + /// Gets or sets Bounds information of the window. When window state is 'minimized', the restored window position and size are returned. + /// </summary> + public Bounds Bounds { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2751813ed501f0411fbcc69b5118408a00128362 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get the browser window that contains the devtools target. + /// </summary> + [Command(ProtocolName.Browser.GetWindowForTarget)] + [SupportedBy("Chrome")] + public class GetWindowForTargetCommand + { + /// <summary> + /// Gets or sets Devtools agent host id. + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3c50de895bacf9488431a4d6810436a36c7629bc --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommandResponse.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get the browser window that contains the devtools target. + /// </summary> + [CommandResponse(ProtocolName.Browser.GetWindowForTarget)] + [SupportedBy("Chrome")] + public class GetWindowForTargetCommandResponse + { + /// <summary> + /// Gets or sets Browser window id. + /// </summary> + public long WindowId { get; set; } + /// <summary> + /// Gets or sets Bounds information of the window. When window state is 'minimized', the restored window position and size are returned. + /// </summary> + public Bounds Bounds { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..680f47200ff1140351a6a9a8b82f25f214282da6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Set position and/or size of the browser window. + /// </summary> + [Command(ProtocolName.Browser.SetWindowBounds)] + [SupportedBy("Chrome")] + public class SetWindowBoundsCommand + { + /// <summary> + /// Gets or sets Browser window id. + /// </summary> + public long WindowId { get; set; } + /// <summary> + /// Gets or sets New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged. + /// </summary> + public Bounds Bounds { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..20e1c12c553cf2d56523f227b3796ebc0c408707 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Set position and/or size of the browser window. + /// </summary> + [CommandResponse(ProtocolName.Browser.SetWindowBounds)] + [SupportedBy("Chrome")] + public class SetWindowBoundsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/WindowState.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/WindowState.cs new file mode 100644 index 0000000000000000000000000000000000000000..104f3a24e64e25f449fcb54d47f5110856b91b45 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/WindowState.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser{ + /// <summary> + /// The state of the browser window. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum WindowState + { + Normal, + Minimized, + Maximized, + Fullscreen, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs index 5944a4c6af62866423b0fcb9e734c5ba1fd7bbe3..6787728bfaa2f68e7d774cbf6271d9c398f514e7 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs @@ -61,5 +61,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// Gets or sets Column offset of the stylesheet within the resource (zero based). /// </summary> public double StartColumn { get; set; } + /// <summary> + /// Gets or sets Size of the content (in characters). + /// </summary> + public double Length { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/RuleUsage.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/RuleUsage.cs index 18d12d9ce4e2bd46be811b2c9be61903ccf5cf8f..57d6499b9804b552b6bef6c14bb7f613155afb15 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/RuleUsage.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/RuleUsage.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS { /// <summary> - /// CSS rule usage information. + /// CSS coverage information. /// </summary> [SupportedBy("Chrome")] public class RuleUsage diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e44ce3d876d8d6fa0b2028ec02e6ef5b09f02540 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation) + /// </summary> + [Command(ProtocolName.CSS.TakeCoverageDelta)] + [SupportedBy("Chrome")] + public class TakeCoverageDeltaCommand + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7cee60163c817722a89c629aef6a68e1e09e79fc --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation) + /// </summary> + [CommandResponse(ProtocolName.CSS.TakeCoverageDelta)] + [SupportedBy("Chrome")] + public class TakeCoverageDeltaCommandResponse + { + /// <summary> + /// Gets or sets Coverage + /// </summary> + public RuleUsage[] Coverage { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs index 7f9b51dd9f333f50aed3afdb0abf2d6ac6932aac..5ae9d8b54986413e3f577016f51c77be53e5b738 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs @@ -19,5 +19,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// Gets or sets Y coordinate. /// </summary> public long Y { get; set; } + /// <summary> + /// Gets or sets False to skip to the nearest non-UA shadow root ancestor (default: false). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IncludeUserAgentShadowDOM { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs index 2fd36b5fbade0ad7b2fb965c2424194edbfc7f40..f82620d182cf997bea5f46103c30b61e68e02b43 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Hides DOM node highlight. + /// Hides any highlight. /// </summary> [Command(ProtocolName.DOM.HideHighlight)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs index df2135a8d94cf4fdf53d8140fcc361dcae0aaab3..2a74784966c427ade1af363804e2d2c23f979a99 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Hides DOM node highlight. + /// Hides any highlight. /// </summary> [CommandResponse(ProtocolName.DOM.HideHighlight)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs index 36955d19c94b370850a8783032c8599c87683cce..8579ae33d69a7cd1312e447e01996955f5ed893b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs @@ -5,30 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// Highlights DOM node. /// </summary> [Command(ProtocolName.DOM.HighlightNode)] [SupportedBy("Chrome")] public class HighlightNodeCommand { - /// <summary> - /// Gets or sets A descriptor for the highlight appearance. - /// </summary> - public HighlightConfig HighlightConfig { get; set; } - /// <summary> - /// Gets or sets Identifier of the node to highlight. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? NodeId { get; set; } - /// <summary> - /// Gets or sets Identifier of the backend node to highlight. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? BackendNodeId { get; set; } - /// <summary> - /// Gets or sets JavaScript object id of the node to be highlighted. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs index b136f0bc5c2b73d9d4b00f7196e66c6d33affcc5..88a1866c1fe89cfaf6f11a31ad3c9d12fde811bb 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// Highlights DOM node. /// </summary> [CommandResponse(ProtocolName.DOM.HighlightNode)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs index da0a0c0d8a781a775b163e6a8160de3557d41ce9..8e93891ecb62c90306336cd8d0b42b60591e502d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs @@ -5,37 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// Highlights given rectangle. /// </summary> [Command(ProtocolName.DOM.HighlightRect)] [SupportedBy("Chrome")] public class HighlightRectCommand { - /// <summary> - /// Gets or sets X coordinate - /// </summary> - public long X { get; set; } - /// <summary> - /// Gets or sets Y coordinate - /// </summary> - public long Y { get; set; } - /// <summary> - /// Gets or sets Rectangle width - /// </summary> - public long Width { get; set; } - /// <summary> - /// Gets or sets Rectangle height - /// </summary> - public long Height { get; set; } - /// <summary> - /// Gets or sets The highlight fill color (default: transparent). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA Color { get; set; } - /// <summary> - /// Gets or sets The highlight outline color (default: transparent). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA OutlineColor { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs index b377ab80face3940e6c409436e72b3edc607a801..06a0d1bec6629056974b21231cdcd98929da8aaf 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// Highlights given rectangle. /// </summary> [CommandResponse(ProtocolName.DOM.HighlightRect)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/NodeHighlightRequestedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/NodeHighlightRequestedEvent.cs deleted file mode 100644 index de433c2b81ee7e39496919f23bcb7e8c304e1f3a..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/NodeHighlightRequestedEvent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM -{ - [Event(ProtocolName.DOM.NodeHighlightRequested)] - [SupportedBy("Chrome")] - public class NodeHighlightRequestedEvent - { - /// <summary> - /// Gets or sets NodeId - /// </summary> - public long NodeId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs index d9150fae8bc984b7700f0c855d508e628afaeb5b..648ae7d78e4a97d1b9b02e297d9d28534c30de91 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs @@ -15,5 +15,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// Gets or sets Location to continue to. /// </summary> public Location Location { get; set; } + /// <summary> + /// Gets or sets TargetCallFrames + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string TargetCallFrames { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommand.cs index 2d1403898fdd069fe8fc146f7b7f7f07e1a78c41..d716ad45e5165455391ad5ae7be2504b7d607ef5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommand.cs @@ -16,7 +16,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> public Location Start { get; set; } /// <summary> - /// Gets or sets End of range to search possible breakpoint locations in (excluding). When not specifed, end of scripts is used as end of range. + /// Gets or sets End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public Location End { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs index b5408faf95fb6a3522723c147b625b93e8b0c233..a776ff476df82ee4f69ccb78f9c7039f60a3e107 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs @@ -66,5 +66,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? Length { get; set; } + /// <summary> + /// Gets or sets JavaScript top stack frame of where the script parsed event was triggered if available. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.StackTrace StackTrace { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs index 5cfcc016eb42028d7cec141926013d5b2cb19348..bf7dbea2410b715e97f2f6b34a0923b424dc8bb5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs @@ -71,5 +71,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? Length { get; set; } + /// <summary> + /// Gets or sets JavaScript top stack frame of where the script parsed event was triggered if available. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.StackTrace StackTrace { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs index f0ac185b0782f42495e5c9127598af1aa92c00d4..95652d7f566c3e0ae7b608cc245cca82b1ee60a9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs @@ -3,7 +3,7 @@ using MasterDevs.ChromeDevTools;using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { /// <summary> - /// If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + /// If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. /// </summary> [Event(ProtocolName.HeapProfiler.LastSeenObjectId)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6f86b1aa505e2fbb267ebd359fb2de975df6ea94 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input +{ + /// <summary> + /// Ignores input events (useful while auditing page). + /// </summary> + [Command(ProtocolName.Input.SetIgnoreInputEvents)] + [SupportedBy("Chrome")] + public class SetIgnoreInputEventsCommand + { + /// <summary> + /// Gets or sets Ignores input events processing when set to true. + /// </summary> + public bool Ignore { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e9dfcc78db8a405ab0fe4a73132e97b62e40668 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input +{ + /// <summary> + /// Ignores input events (useful while auditing page). + /// </summary> + [CommandResponse(ProtocolName.Input.SetIgnoreInputEvents)] + [SupportedBy("Chrome")] + public class SetIgnoreInputEventsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/AddBlockedURLCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/AddBlockedURLCommand.cs deleted file mode 100644 index 8d4e1f80745bcfe2fa5ab884b93757825bd4ebc3..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Network/AddBlockedURLCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network -{ - /// <summary> - /// Blocks specific URL from loading. - /// </summary> - [Command(ProtocolName.Network.AddBlockedURL)] - [SupportedBy("Chrome")] - public class AddBlockedURLCommand - { - /// <summary> - /// Gets or sets URL to block. - /// </summary> - public string Url { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/RemoveBlockedURLCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/RemoveBlockedURLCommandResponse.cs deleted file mode 100644 index 2851cedfacbfa491fca4194874d305cc8dc112e6..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Network/RemoveBlockedURLCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network -{ - /// <summary> - /// Cancels blocking of a specific URL from loading. - /// </summary> - [CommandResponse(ProtocolName.Network.RemoveBlockedURL)] - [SupportedBy("Chrome")] - public class RemoveBlockedURLCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs b/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs index d34fa12a0fd6f7f072334c47634127d4a9f46c73..7845175157bf578df47549c69de6fe66c6d33472 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs @@ -40,5 +40,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// Gets or sets The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ /// </summary> public string ReferrerPolicy { get; set; } + /// <summary> + /// Gets or sets Whether is loaded via link preload. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IsLinkPreload { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/RemoveBlockedURLCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommand.cs similarity index 52% rename from source/ChromeDevTools/Protocol/Chrome/Network/RemoveBlockedURLCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommand.cs index 8bdfa548a3c3af151c185ef3a625351a84bcc747..116b7207dfeb2f89f36ecd3efb05439d92f75f45 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/RemoveBlockedURLCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommand.cs @@ -5,15 +5,15 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network { /// <summary> - /// Cancels blocking of a specific URL from loading. + /// Blocks URLs from loading. /// </summary> - [Command(ProtocolName.Network.RemoveBlockedURL)] + [Command(ProtocolName.Network.SetBlockedURLs)] [SupportedBy("Chrome")] - public class RemoveBlockedURLCommand + public class SetBlockedURLsCommand { /// <summary> - /// Gets or sets URL to stop blocking. + /// Gets or sets URL patterns to block. Wildcards ('*') are allowed. /// </summary> - public string Url { get; set; } + public string[] Urls { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/AddBlockedURLCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommandResponse.cs similarity index 61% rename from source/ChromeDevTools/Protocol/Chrome/Network/AddBlockedURLCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommandResponse.cs index bfb7b14a4a43eb46cb169cc07b97c14ebd210022..2eb769cd06a95aed073450b151d7a153614f8128 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/AddBlockedURLCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommandResponse.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network { /// <summary> - /// Blocks specific URL from loading. + /// Blocks URLs from loading. /// </summary> - [CommandResponse(ProtocolName.Network.AddBlockedURL)] + [CommandResponse(ProtocolName.Network.SetBlockedURLs)] [SupportedBy("Chrome")] - public class AddBlockedURLCommandResponse + public class SetBlockedURLsCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommand.cs deleted file mode 100644 index 5b4b2d0613c549476c7dc13d68cdf0b019dea08f..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network -{ - /// <summary> - /// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued. - /// </summary> - [Command(ProtocolName.Network.SetMonitoringXHREnabled)] - [SupportedBy("Chrome")] - public class SetMonitoringXHREnabledCommand - { - /// <summary> - /// Gets or sets Monitoring enabled state. - /// </summary> - public bool Enabled { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommandResponse.cs deleted file mode 100644 index 32747df88f57a442f525b052944c2c23f9a13f1c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network -{ - /// <summary> - /// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued. - /// </summary> - [CommandResponse(ProtocolName.Network.SetMonitoringXHREnabled)] - [SupportedBy("Chrome")] - public class SetMonitoringXHREnabledCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..af8df6d78a7d66fc6cf7d396a8984605eb20f38e --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Disables domain notifications. + /// </summary> + [Command(ProtocolName.Overlay.Disable)] + [SupportedBy("Chrome")] + public class DisableCommand + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d441c57f3fd8fbdbc10624905b511900f7967667 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Disables domain notifications. + /// </summary> + [CommandResponse(ProtocolName.Overlay.Disable)] + [SupportedBy("Chrome")] + public class DisableCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ded889d1729d261b0cb792e0bc83cfb5dbbe0d0d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Enables domain notifications. + /// </summary> + [Command(ProtocolName.Overlay.Enable)] + [SupportedBy("Chrome")] + public class EnableCommand + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2ace3bf8851e090052d456febedecf0754d15168 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Enables domain notifications. + /// </summary> + [CommandResponse(ProtocolName.Overlay.Enable)] + [SupportedBy("Chrome")] + public class EnableCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommand.cs similarity index 74% rename from source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommand.cs index 42efbd571d7779e1895566b03311414b4f3552a4..a43b6d30b7070bb114975b3859c507496ddd79b9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// For testing. /// </summary> - [Command(ProtocolName.DOM.GetHighlightObjectForTest)] + [Command(ProtocolName.Overlay.GetHighlightObjectForTest)] [SupportedBy("Chrome")] public class GetHighlightObjectForTestCommand { diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommandResponse.cs similarity index 73% rename from source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommandResponse.cs index 5e0c8fc098999396a553a9ccf34ab930dba2bed0..43eaeb523deb408d34d09236fa9c1b63544c7ac9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// For testing. /// </summary> - [CommandResponse(ProtocolName.DOM.GetHighlightObjectForTest)] + [CommandResponse(ProtocolName.Overlay.GetHighlightObjectForTest)] [SupportedBy("Chrome")] public class GetHighlightObjectForTestCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cb6bfd8ba9a52b34175db7713fb97db90c09a6c6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Hides any highlight. + /// </summary> + [Command(ProtocolName.Overlay.HideHighlight)] + [SupportedBy("Chrome")] + public class HideHighlightCommand + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5fa6d12c722a007b3a5f537a43e4e16e8b07e33d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Hides any highlight. + /// </summary> + [CommandResponse(ProtocolName.Overlay.HideHighlight)] + [SupportedBy("Chrome")] + public class HideHighlightCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightConfig.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightConfig.cs similarity index 86% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightConfig.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightConfig.cs index 48dfb8a1c4782f51689f19a4391f0861356c43b7..96a783aa74c4c7a0f47c3e60ec40af3176f51329 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightConfig.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightConfig.cs @@ -2,7 +2,7 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Configuration data for the highlighting of page elements. @@ -34,37 +34,37 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// Gets or sets The content box highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ContentColor { get; set; } + public DOM.RGBA ContentColor { get; set; } /// <summary> /// Gets or sets The padding highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA PaddingColor { get; set; } + public DOM.RGBA PaddingColor { get; set; } /// <summary> /// Gets or sets The border highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA BorderColor { get; set; } + public DOM.RGBA BorderColor { get; set; } /// <summary> /// Gets or sets The margin highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA MarginColor { get; set; } + public DOM.RGBA MarginColor { get; set; } /// <summary> /// Gets or sets The event target element highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA EventTargetColor { get; set; } + public DOM.RGBA EventTargetColor { get; set; } /// <summary> /// Gets or sets The shape outside fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ShapeColor { get; set; } + public DOM.RGBA ShapeColor { get; set; } /// <summary> /// Gets or sets The shape margin fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ShapeMarginColor { get; set; } + public DOM.RGBA ShapeMarginColor { get; set; } /// <summary> /// Gets or sets Selectors to highlight relevant nodes. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommand.cs similarity index 78% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommand.cs index 43a7129634069b6df22e2709e37c2d34a506eb45..82bc1a7ceaba4e076fbb76e2eddd69bd02fcae28 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights owner element of the frame with given id. /// </summary> - [Command(ProtocolName.DOM.HighlightFrame)] + [Command(ProtocolName.Overlay.HighlightFrame)] [SupportedBy("Chrome")] public class HighlightFrameCommand { @@ -19,11 +19,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// Gets or sets The content box highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ContentColor { get; set; } + public DOM.RGBA ContentColor { get; set; } /// <summary> /// Gets or sets The content box highlight outline color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ContentOutlineColor { get; set; } + public DOM.RGBA ContentOutlineColor { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommandResponse.cs similarity index 69% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommandResponse.cs index 47d55595c6f8a5feeca70381e53d57de3f7c8e07..ec37eb745b4c7dab1e90ea9738014d9d12c3ae06 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights owner element of the frame with given id. /// </summary> - [CommandResponse(ProtocolName.DOM.HighlightFrame)] + [CommandResponse(ProtocolName.Overlay.HighlightFrame)] [SupportedBy("Chrome")] public class HighlightFrameCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0908081763b9c94505372c34401f1916f0d92deb --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommand.cs @@ -0,0 +1,34 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// </summary> + [Command(ProtocolName.Overlay.HighlightNode)] + [SupportedBy("Chrome")] + public class HighlightNodeCommand + { + /// <summary> + /// Gets or sets A descriptor for the highlight appearance. + /// </summary> + public HighlightConfig HighlightConfig { get; set; } + /// <summary> + /// Gets or sets Identifier of the node to highlight. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? NodeId { get; set; } + /// <summary> + /// Gets or sets Identifier of the backend node to highlight. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? BackendNodeId { get; set; } + /// <summary> + /// Gets or sets JavaScript object id of the node to be highlighted. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string ObjectId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6baa6bedd0a825e5be17a439c90d9110e7ef8643 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// </summary> + [CommandResponse(ProtocolName.Overlay.HighlightNode)] + [SupportedBy("Chrome")] + public class HighlightNodeCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommand.cs similarity index 74% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommand.cs index 88252e62fa885bbbaa0aa1945720ba65231210c6..04bce8590a0faa536b73d60f802552ad38fd9b5a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommand.cs @@ -2,28 +2,28 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights given quad. Coordinates are absolute with respect to the main frame viewport. /// </summary> - [Command(ProtocolName.DOM.HighlightQuad)] + [Command(ProtocolName.Overlay.HighlightQuad)] [SupportedBy("Chrome")] public class HighlightQuadCommand { /// <summary> /// Gets or sets Quad to highlight /// </summary> - public double[] Quad { get; set; } + public DOM.double[] Quad { get; set; } /// <summary> /// Gets or sets The highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA Color { get; set; } + public DOM.RGBA Color { get; set; } /// <summary> /// Gets or sets The highlight outline color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA OutlineColor { get; set; } + public DOM.RGBA OutlineColor { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommandResponse.cs similarity index 71% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommandResponse.cs index f8c60082ab7216892aeb0b2a0cd43c9e33275ea6..655035ff76827807115f0a69abbce932aa088381 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights given quad. Coordinates are absolute with respect to the main frame viewport. /// </summary> - [CommandResponse(ProtocolName.DOM.HighlightQuad)] + [CommandResponse(ProtocolName.Overlay.HighlightQuad)] [SupportedBy("Chrome")] public class HighlightQuadCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..58fabedd310c2dc964486f453c5823ec562dcbcc --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommand.cs @@ -0,0 +1,41 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [Command(ProtocolName.Overlay.HighlightRect)] + [SupportedBy("Chrome")] + public class HighlightRectCommand + { + /// <summary> + /// Gets or sets X coordinate + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets Rectangle width + /// </summary> + public long Width { get; set; } + /// <summary> + /// Gets or sets Rectangle height + /// </summary> + public long Height { get; set; } + /// <summary> + /// Gets or sets The highlight fill color (default: transparent). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public DOM.RGBA Color { get; set; } + /// <summary> + /// Gets or sets The highlight outline color (default: transparent). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public DOM.RGBA OutlineColor { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c12b30b4331688a99699bc844a0c40bdfb75c8c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [CommandResponse(ProtocolName.Overlay.HighlightRect)] + [SupportedBy("Chrome")] + public class HighlightRectCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/InspectMode.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectMode.cs similarity index 82% rename from source/ChromeDevTools/Protocol/Chrome/DOM/InspectMode.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/InspectMode.cs index 5bd7e5cf5efd4fab31f6eff94c89ba870baff49a..a82ea1408fb3db08b20389fa24aba004a6dae919 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/InspectMode.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectMode.cs @@ -4,7 +4,7 @@ using Newtonsoft.Json.Converters; using System.Runtime.Serialization; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM{ +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay{ /// <summary> /// /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/InspectNodeRequestedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectNodeRequestedEvent.cs similarity index 64% rename from source/ChromeDevTools/Protocol/Chrome/DOM/InspectNodeRequestedEvent.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/InspectNodeRequestedEvent.cs index d57cee355e8df9498d3b2060cc126c2294e439f7..cdcf079ddda1e80ebe258211d6557fd05a8ce9b1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/InspectNodeRequestedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectNodeRequestedEvent.cs @@ -1,11 +1,11 @@ using MasterDevs.ChromeDevTools;using Newtonsoft.Json; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> - /// Fired when the node should be inspected. This happens after call to <code>setInspectMode</code>. + /// Fired when the node should be inspected. This happens after call to <code>setInspectMode</code> or when user manually inspects an element. /// </summary> - [Event(ProtocolName.DOM.InspectNodeRequested)] + [Event(ProtocolName.Overlay.InspectNodeRequested)] [SupportedBy("Chrome")] public class InspectNodeRequestedEvent { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/NodeHighlightRequestedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/NodeHighlightRequestedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..4931677b43798defc95a62627584e418c5aac816 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/NodeHighlightRequestedEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Fired when the node should be highlighted. This happens after call to <code>setInspectMode</code>. + /// </summary> + [Event(ProtocolName.Overlay.NodeHighlightRequested)] + [SupportedBy("Chrome")] + public class NodeHighlightRequestedEvent + { + /// <summary> + /// Gets or sets NodeId + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommand.cs similarity index 87% rename from source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommand.cs index 70a3c7ecf66f1a37ae0cf4cfbbbd3664770a6db7..ec1d8e023f16b74a603d780b8dc1bedeec886669 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection. /// </summary> - [Command(ProtocolName.DOM.SetInspectMode)] + [Command(ProtocolName.Overlay.SetInspectMode)] [SupportedBy("Chrome")] public class SetInspectModeCommand { diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommandResponse.cs similarity index 76% rename from source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommandResponse.cs index 40cd2e24fd2492ef8c2999b477fa1fc3489587cc..d08f5bb590ee49a2c4fb35a6eb8d43616de8ec3f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection. /// </summary> - [CommandResponse(ProtocolName.DOM.SetInspectMode)] + [CommandResponse(ProtocolName.Overlay.SetInspectMode)] [SupportedBy("Chrome")] public class SetInspectModeCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf4befa50a4bbc50154b3d20ec8ddc1b9fbe8849 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommand.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [Command(ProtocolName.Overlay.SetPausedInDebuggerMessage)] + [SupportedBy("Chrome")] + public class SetPausedInDebuggerMessageCommand + { + /// <summary> + /// Gets or sets The message to display, also triggers resume and step over controls. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Message { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7e1efed32c4280eadb6361f742eb835c528a005 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [CommandResponse(ProtocolName.Overlay.SetPausedInDebuggerMessage)] + [SupportedBy("Chrome")] + public class SetPausedInDebuggerMessageCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommand.cs similarity index 76% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommand.cs index cbb860cc57a8116bd2f45f37b5218888c45daefc..8875f6e66374c0f65c8a0d667804e9efc1036adf 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows debug borders on layers /// </summary> - [Command(ProtocolName.Rendering.SetShowDebugBorders)] + [Command(ProtocolName.Overlay.SetShowDebugBorders)] [SupportedBy("Chrome")] public class SetShowDebugBordersCommand { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommandResponse.cs similarity index 67% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommandResponse.cs index 93d88e1f33c9283f8c13538c544788ac6337f36b..b7a86b6781da1dc73db55c1fddd16d3e357f8f32 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows debug borders on layers /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowDebugBorders)] + [CommandResponse(ProtocolName.Overlay.SetShowDebugBorders)] [SupportedBy("Chrome")] public class SetShowDebugBordersCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommand.cs similarity index 75% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommand.cs index ba4bdf25bfa0dfb901b527faa81da49dfb282cba..4a6cda1757b6ff22c34d9fff679ba0b0f81a8b32 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows the FPS counter /// </summary> - [Command(ProtocolName.Rendering.SetShowFPSCounter)] + [Command(ProtocolName.Overlay.SetShowFPSCounter)] [SupportedBy("Chrome")] public class SetShowFPSCounterCommand { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommandResponse.cs similarity index 67% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommandResponse.cs index 987b752680921c5c740486fe3b1180bff505c809..361fcf7849734cf31687b7b9562a5f8bca656e41 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows the FPS counter /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowFPSCounter)] + [CommandResponse(ProtocolName.Overlay.SetShowFPSCounter)] [SupportedBy("Chrome")] public class SetShowFPSCounterCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommand.cs similarity index 76% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommand.cs index 46fa327af22de195d6d52beaa05b79b66d820ed2..3a9bfe6525d9dad084ff0daec3930ce6ef87cacd 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows paint rectangles /// </summary> - [Command(ProtocolName.Rendering.SetShowPaintRects)] + [Command(ProtocolName.Overlay.SetShowPaintRects)] [SupportedBy("Chrome")] public class SetShowPaintRectsCommand { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommandResponse.cs similarity index 67% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommandResponse.cs index 2b31d5f7bb2b2289ceec0ea04b4fe22c158c6551..cd69541a5390c8f56794f00f2390fcb79d55a25f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows paint rectangles /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowPaintRects)] + [CommandResponse(ProtocolName.Overlay.SetShowPaintRects)] [SupportedBy("Chrome")] public class SetShowPaintRectsCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommand.cs similarity index 75% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommand.cs index 462ebec49f8fad83f61c40fa2c7574f2e5c4a414..651c68152d1adf9004c470e1ceae64cf4ce3ec1b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows scroll bottleneck rects /// </summary> - [Command(ProtocolName.Rendering.SetShowScrollBottleneckRects)] + [Command(ProtocolName.Overlay.SetShowScrollBottleneckRects)] [SupportedBy("Chrome")] public class SetShowScrollBottleneckRectsCommand { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommandResponse.cs similarity index 66% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommandResponse.cs index 89528ea74a8fe2b7b05d2541d36131e27a3f631d..1865574fc75789d300b4d9de43b74cebcc41a88f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows scroll bottleneck rects /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowScrollBottleneckRects)] + [CommandResponse(ProtocolName.Overlay.SetShowScrollBottleneckRects)] [SupportedBy("Chrome")] public class SetShowScrollBottleneckRectsCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowViewportSizeOnResizeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommand.cs similarity index 74% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowViewportSizeOnResizeCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommand.cs index 1442c25aee5ea49beab66bf12650505195024340..219b805c91477cd7201ef4a03c611b818b4a57c3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowViewportSizeOnResizeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommand.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Paints viewport size upon main frame resize. /// </summary> - [Command(ProtocolName.Rendering.SetShowViewportSizeOnResize)] + [Command(ProtocolName.Overlay.SetShowViewportSizeOnResize)] [SupportedBy("Chrome")] public class SetShowViewportSizeOnResizeCommand { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowViewportSizeOnResizeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommandResponse.cs similarity index 66% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowViewportSizeOnResizeCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommandResponse.cs index 1f1d02c7dafaf206ec69c0be9902d55c3e50a449..fc697307d08f230673e09ddaea8b954cb96c163a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowViewportSizeOnResizeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Paints viewport size upon main frame resize. /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowViewportSizeOnResize)] + [CommandResponse(ProtocolName.Overlay.SetShowViewportSizeOnResize)] [SupportedBy("Chrome")] public class SetShowViewportSizeOnResizeCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6e227e7f0daa5ef66fe90c12d2b0d36ab88a4df9 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommand.cs @@ -0,0 +1,16 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [Command(ProtocolName.Overlay.SetSuspended)] + [SupportedBy("Chrome")] + public class SetSuspendedCommand + { + /// <summary> + /// Gets or sets Whether overlay should be suspended and not consume any resources until resumed. + /// </summary> + public bool Suspended { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2f9d9cab9d654cb5291519c40678f9e6ca1179d4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [CommandResponse(ProtocolName.Overlay.SetSuspended)] + [SupportedBy("Chrome")] + public class SetSuspendedCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs index d3599a8b5e053d58b291ec08f946f16c3221b836..b92575a35bd7fbf829828f8f018b9ddcefda4e70 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs @@ -21,5 +21,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? Quality { get; set; } + /// <summary> + /// Gets or sets Capture the screenshot from the surface, rather than the view. Defaults to true. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? FromSurface { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ColorPickedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ColorPickedEvent.cs deleted file mode 100644 index 45ec9c5d8bfa44ee9c00f80e52a0a7f763d66af4..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ColorPickedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Fired when a color has been picked. - /// </summary> - [Event(ProtocolName.Page.ColorPicked)] - [SupportedBy("Chrome")] - public class ColorPickedEvent - { - /// <summary> - /// Gets or sets RGBA of the picked color. - /// </summary> - public DOM.RGBA Color { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ConfigureOverlayCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ConfigureOverlayCommand.cs deleted file mode 100644 index ddb6c17df5d56cfabf2e192b62b445dff5ecc063..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ConfigureOverlayCommand.cs +++ /dev/null @@ -1,25 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Configures overlay. - /// </summary> - [Command(ProtocolName.Page.ConfigureOverlay)] - [SupportedBy("Chrome")] - public class ConfigureOverlayCommand - { - /// <summary> - /// Gets or sets Whether overlay should be suspended and not consume any resources. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? Suspended { get; set; } - /// <summary> - /// Gets or sets Overlay message to display. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ConfigureOverlayCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ConfigureOverlayCommandResponse.cs deleted file mode 100644 index 877605ba5909e4ff250787c18d572c7b099a3000..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ConfigureOverlayCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Configures overlay. - /// </summary> - [CommandResponse(ProtocolName.Page.ConfigureOverlay)] - [SupportedBy("Chrome")] - public class ConfigureOverlayCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7552f16628cd2e8cac8362993fd14d8ad6006af --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommand.cs @@ -0,0 +1,29 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Creates an isolated world for the given frame. + /// </summary> + [Command(ProtocolName.Page.CreateIsolatedWorld)] + [SupportedBy("Chrome")] + public class CreateIsolatedWorldCommand + { + /// <summary> + /// Gets or sets Id of the frame in which the isolated world should be created. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets An optional name which is reported in the Execution Context. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string WorldName { get; set; } + /// <summary> + /// Gets or sets Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? GrantUniveralAccess { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommandResponse.cs similarity index 57% rename from source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommandResponse.cs index 28a7f2d406495ae4d30b1bce20c5498319dfb3d7..4fe866121bc6104de85880203e78c0aeab425d52 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommandResponse.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Shows / hides color picker + /// Creates an isolated world for the given frame. /// </summary> - [CommandResponse(ProtocolName.Page.SetColorPickerEnabled)] + [CommandResponse(ProtocolName.Page.CreateIsolatedWorld)] [SupportedBy("Chrome")] - public class SetColorPickerEnabledCommandResponse + public class CreateIsolatedWorldCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs index e426f3dc531e80ce1af74fde7060ef06ab1cc849..04b63e8da129facd6971047d115b2e7d64ffda77 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs @@ -17,5 +17,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// Gets or sets Parent frame identifier. /// </summary> public string ParentFrameId { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace of when frame was attached, only set if frame initiated from script. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.StackTrace Stack { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs index a48af94a979b216ea888377af51686cb1c2f01f0..4b3995c57360c4ed103193bf9510adcf5a21c72a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs @@ -20,5 +20,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Referrer { get; set; } + /// <summary> + /// Gets or sets Intended transition type. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string TransitionType { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs index 301e6a0befbcc3891dfbaf2eb3f24ed9351b6b60..48e74e963c61dd452338db14d7b7bb52595c8014 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs @@ -19,8 +19,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> public string Url { get; set; } /// <summary> + /// Gets or sets URL that the user typed in the url bar. + /// </summary> + public string UserTypedURL { get; set; } + /// <summary> /// Gets or sets Title of the navigation history entry. /// </summary> public string Title { get; set; } + /// <summary> + /// Gets or sets Transition type. + /// </summary> + public TransitionType TransitionType { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommand.cs index cc1d4e34833f88cb96ed1076831326f8c3ff63d3..98b8be0fc9c7e54e1fe57213740b8d3cf04e483d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommand.cs @@ -5,11 +5,66 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Print page as pdf. + /// Print page as PDF. /// </summary> [Command(ProtocolName.Page.PrintToPDF)] [SupportedBy("Chrome")] public class PrintToPDFCommand { + /// <summary> + /// Gets or sets Paper orientation. Defaults to false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Landscape { get; set; } + /// <summary> + /// Gets or sets Display header and footer. Defaults to false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? DisplayHeaderFooter { get; set; } + /// <summary> + /// Gets or sets Print background graphics. Defaults to false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? PrintBackground { get; set; } + /// <summary> + /// Gets or sets Scale of the webpage rendering. Defaults to 1. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double Scale { get; set; } + /// <summary> + /// Gets or sets Paper width in inches. Defaults to 8.5 inches. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double PaperWidth { get; set; } + /// <summary> + /// Gets or sets Paper height in inches. Defaults to 11 inches. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double PaperHeight { get; set; } + /// <summary> + /// Gets or sets Top margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginTop { get; set; } + /// <summary> + /// Gets or sets Bottom margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginBottom { get; set; } + /// <summary> + /// Gets or sets Left margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginLeft { get; set; } + /// <summary> + /// Gets or sets Right margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginRight { get; set; } + /// <summary> + /// Gets or sets Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string PageRanges { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommandResponse.cs index 75329521d8c3cef0e0774adb47b7051a51f8d3cd..a503ff575aa271d7aabefab5d7309d852227ecc4 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Print page as pdf. + /// Print page as PDF. /// </summary> [CommandResponse(ProtocolName.Page.PrintToPDF)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommand.cs deleted file mode 100644 index a84b0f0ff4a1d03f9b83caff92a31898f69f2f48..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Shows / hides color picker - /// </summary> - [Command(ProtocolName.Page.SetColorPickerEnabled)] - [SupportedBy("Chrome")] - public class SetColorPickerEnabledCommand - { - /// <summary> - /// Gets or sets Shows / hides color picker - /// </summary> - public bool Enabled { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/TransitionType.cs b/source/ChromeDevTools/Protocol/Chrome/Page/TransitionType.cs new file mode 100644 index 0000000000000000000000000000000000000000..490ec56cb5b3cc362e2946630b8b3372ed253dc0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/TransitionType.cs @@ -0,0 +1,27 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page{ + /// <summary> + /// Transition type. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum TransitionType + { + Link, + Typed, + Auto_bookmark, + Auto_subframe, + Manual_subframe, + Generated, + Auto_toplevel, + Form_submit, + Reload, + Keyword, + Keyword_generated, + Other, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs index effaeecc1b501c61843cb3f1c4257ec6984cf53d..aa4da37795d21661dd5f55aeed5193c108f2d8cc 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs @@ -3,7 +3,7 @@ using MasterDevs.ChromeDevTools;using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler { /// <summary> - /// Sent when new profile recodring is started using console.profile() call. + /// Sent when new profile recording is started using console.profile() call. /// </summary> [Event(ProtocolName.Profiler.ConsoleProfileStarted)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/CoverageRange.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/CoverageRange.cs index cdf7f02300eec1aba9f1277b0712db1bd7d99390..68437f21865acdfc7caccc619f81aa5461bb6ec2 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/CoverageRange.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/CoverageRange.cs @@ -10,22 +10,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler [SupportedBy("Chrome")] public class CoverageRange { - /// <summary> - /// Gets or sets JavaScript script line number (0-based) for the range start. - /// </summary> - public long StartLineNumber { get; set; } - /// <summary> - /// Gets or sets JavaScript script column number (0-based) for the range start. - /// </summary> - public long StartColumnNumber { get; set; } - /// <summary> - /// Gets or sets JavaScript script line number (0-based) for the range end. - /// </summary> - public long EndLineNumber { get; set; } - /// <summary> - /// Gets or sets JavaScript script column number (0-based) for the range end. - /// </summary> - public long EndColumnNumber { get; set; } /// <summary> /// Gets or sets JavaScript script source offset for the range start. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommand.cs index f842f9bbc0f2cf8e68cb24fcebfc3bb33c23d1bb..a90297c36150ed3984c17ff7d804639f3e594019 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommand.cs @@ -11,5 +11,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler [SupportedBy("Chrome")] public class StartPreciseCoverageCommand { + /// <summary> + /// Gets or sets Collect accurate call counts beyond simple 'covered' or 'not covered'. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? CallCount { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs b/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs index 77b7b4a7beb3d99e51451f9c6108301ea2daa49d..b51f897294204ece2317da1c746db21d96925eda 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs @@ -156,13 +156,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string StopScreencast = "Page.stopScreencast"; public const string ScreencastFrameAck = "Page.screencastFrameAck"; public const string HandleJavaScriptDialog = "Page.handleJavaScriptDialog"; - public const string SetColorPickerEnabled = "Page.setColorPickerEnabled"; - public const string ConfigureOverlay = "Page.configureOverlay"; public const string GetAppManifest = "Page.getAppManifest"; public const string RequestAppBanner = "Page.requestAppBanner"; public const string SetControlNavigations = "Page.setControlNavigations"; public const string ProcessNavigation = "Page.processNavigation"; public const string GetLayoutMetrics = "Page.getLayoutMetrics"; + public const string CreateIsolatedWorld = "Page.createIsolatedWorld"; public const string DomContentEventFired = "Page.domContentEventFired"; public const string LoadEventFired = "Page.loadEventFired"; public const string FrameAttached = "Page.frameAttached"; @@ -177,19 +176,31 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string JavascriptDialogClosed = "Page.javascriptDialogClosed"; public const string ScreencastFrame = "Page.screencastFrame"; public const string ScreencastVisibilityChanged = "Page.screencastVisibilityChanged"; - public const string ColorPicked = "Page.colorPicked"; public const string InterstitialShown = "Page.interstitialShown"; public const string InterstitialHidden = "Page.interstitialHidden"; public const string NavigationRequested = "Page.navigationRequested"; } - public static class Rendering - { - public const string SetShowPaintRects = "Rendering.setShowPaintRects"; - public const string SetShowDebugBorders = "Rendering.setShowDebugBorders"; - public const string SetShowFPSCounter = "Rendering.setShowFPSCounter"; - public const string SetShowScrollBottleneckRects = "Rendering.setShowScrollBottleneckRects"; - public const string SetShowViewportSizeOnResize = "Rendering.setShowViewportSizeOnResize"; + public static class Overlay + { + public const string Enable = "Overlay.enable"; + public const string Disable = "Overlay.disable"; + public const string SetShowPaintRects = "Overlay.setShowPaintRects"; + public const string SetShowDebugBorders = "Overlay.setShowDebugBorders"; + public const string SetShowFPSCounter = "Overlay.setShowFPSCounter"; + public const string SetShowScrollBottleneckRects = "Overlay.setShowScrollBottleneckRects"; + public const string SetShowViewportSizeOnResize = "Overlay.setShowViewportSizeOnResize"; + public const string SetPausedInDebuggerMessage = "Overlay.setPausedInDebuggerMessage"; + public const string SetSuspended = "Overlay.setSuspended"; + public const string SetInspectMode = "Overlay.setInspectMode"; + public const string HighlightRect = "Overlay.highlightRect"; + public const string HighlightQuad = "Overlay.highlightQuad"; + public const string HighlightNode = "Overlay.highlightNode"; + public const string HighlightFrame = "Overlay.highlightFrame"; + public const string HideHighlight = "Overlay.hideHighlight"; + public const string GetHighlightObjectForTest = "Overlay.getHighlightObjectForTest"; + public const string NodeHighlightRequested = "Overlay.nodeHighlightRequested"; + public const string InspectNodeRequested = "Overlay.inspectNodeRequested"; } public static class Emulation @@ -218,7 +229,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string Enable = "Security.enable"; public const string Disable = "Security.disable"; public const string ShowCertificateViewer = "Security.showCertificateViewer"; + public const string HandleCertificateError = "Security.handleCertificateError"; + public const string SetOverrideCertificateErrors = "Security.setOverrideCertificateErrors"; public const string SecurityStateChanged = "Security.securityStateChanged"; + public const string CertificateError = "Security.certificateError"; } public static class Network @@ -228,10 +242,8 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string SetUserAgentOverride = "Network.setUserAgentOverride"; public const string SetExtraHTTPHeaders = "Network.setExtraHTTPHeaders"; public const string GetResponseBody = "Network.getResponseBody"; - public const string AddBlockedURL = "Network.addBlockedURL"; - public const string RemoveBlockedURL = "Network.removeBlockedURL"; + public const string SetBlockedURLs = "Network.setBlockedURLs"; public const string ReplayXHR = "Network.replayXHR"; - public const string SetMonitoringXHREnabled = "Network.setMonitoringXHREnabled"; public const string CanClearBrowserCache = "Network.canClearBrowserCache"; public const string ClearBrowserCache = "Network.clearBrowserCache"; public const string CanClearBrowserCookies = "Network.canClearBrowserCookies"; @@ -337,12 +349,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string GetSearchResults = "DOM.getSearchResults"; public const string DiscardSearchResults = "DOM.discardSearchResults"; public const string RequestNode = "DOM.requestNode"; - public const string SetInspectMode = "DOM.setInspectMode"; public const string HighlightRect = "DOM.highlightRect"; - public const string HighlightQuad = "DOM.highlightQuad"; public const string HighlightNode = "DOM.highlightNode"; public const string HideHighlight = "DOM.hideHighlight"; - public const string HighlightFrame = "DOM.highlightFrame"; public const string PushNodeByPathToFrontend = "DOM.pushNodeByPathToFrontend"; public const string PushNodesByBackendIdsToFrontend = "DOM.pushNodesByBackendIdsToFrontend"; public const string SetInspectedNode = "DOM.setInspectedNode"; @@ -358,9 +367,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string GetBoxModel = "DOM.getBoxModel"; public const string GetNodeForLocation = "DOM.getNodeForLocation"; public const string GetRelayoutBoundary = "DOM.getRelayoutBoundary"; - public const string GetHighlightObjectForTest = "DOM.getHighlightObjectForTest"; public const string DocumentUpdated = "DOM.documentUpdated"; - public const string InspectNodeRequested = "DOM.inspectNodeRequested"; public const string SetChildNodes = "DOM.setChildNodes"; public const string AttributeModified = "DOM.attributeModified"; public const string AttributeRemoved = "DOM.attributeRemoved"; @@ -374,7 +381,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string PseudoElementAdded = "DOM.pseudoElementAdded"; public const string PseudoElementRemoved = "DOM.pseudoElementRemoved"; public const string DistributedNodesUpdated = "DOM.distributedNodesUpdated"; - public const string NodeHighlightRequested = "DOM.nodeHighlightRequested"; } public static class CSS @@ -400,6 +406,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string GetBackgroundColors = "CSS.getBackgroundColors"; public const string GetLayoutTreeAndStyles = "CSS.getLayoutTreeAndStyles"; public const string StartRuleUsageTracking = "CSS.startRuleUsageTracking"; + public const string TakeCoverageDelta = "CSS.takeCoverageDelta"; public const string StopRuleUsageTracking = "CSS.stopRuleUsageTracking"; public const string MediaQueryResultChanged = "CSS.mediaQueryResultChanged"; public const string FontsUpdated = "CSS.fontsUpdated"; @@ -470,6 +477,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public static class Input { + public const string SetIgnoreInputEvents = "Input.setIgnoreInputEvents"; public const string DispatchKeyEvent = "Input.dispatchKeyEvent"; public const string DispatchMouseEvent = "Input.dispatchMouseEvent"; public const string DispatchTouchEvent = "Input.dispatchTouchEvent"; @@ -561,5 +569,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string Accepted = "Tethering.accepted"; } + public static class Browser + { + public const string GetWindowForTarget = "Browser.getWindowForTarget"; + public const string SetWindowBounds = "Browser.setWindowBounds"; + public const string GetWindowBounds = "Browser.getWindowBounds"; + } + } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs index 0a60e503e9f497ed306336bc2576c0dacb86b7b2..53d76bbc7eaeb4fcd26040b0e6c94dd0ecaee594 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs @@ -10,7 +10,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime public class ExecutionContextCreatedEvent { /// <summary> - /// Gets or sets A newly created execution contex. + /// Gets or sets A newly created execution context. /// </summary> public ExecutionContextDescription Context { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorAction.cs b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorAction.cs new file mode 100644 index 0000000000000000000000000000000000000000..7d699bb681824009867f8fc47c275706d4b149fe --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorAction.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security{ + /// <summary> + /// The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum CertificateErrorAction + { + Continue, + Cancel, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..e6f8d20139f97d108e36921631c034bc4cbeb29f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorEvent.cs @@ -0,0 +1,25 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally. + /// </summary> + [Event(ProtocolName.Security.CertificateError)] + [SupportedBy("Chrome")] + public class CertificateErrorEvent + { + /// <summary> + /// Gets or sets The ID of the event. + /// </summary> + public long EventId { get; set; } + /// <summary> + /// Gets or sets The type of the error. + /// </summary> + public string ErrorType { get; set; } + /// <summary> + /// Gets or sets The url that was requested. + /// </summary> + public string RequestURL { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ba59364490e5b9208004fce9129403c997fc54c5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Handles a certificate error that fired a certificateError event. + /// </summary> + [Command(ProtocolName.Security.HandleCertificateError)] + [SupportedBy("Chrome")] + public class HandleCertificateErrorCommand + { + /// <summary> + /// Gets or sets The ID of the event. + /// </summary> + public long EventId { get; set; } + /// <summary> + /// Gets or sets The action to take on the certificate error. + /// </summary> + public string Action { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c89f25685636ec9f6eeb742cb2ced07bfd3282a5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Handles a certificate error that fired a certificateError event. + /// </summary> + [CommandResponse(ProtocolName.Security.HandleCertificateError)] + [SupportedBy("Chrome")] + public class HandleCertificateErrorCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/InsecureContentStatus.cs b/source/ChromeDevTools/Protocol/Chrome/Security/InsecureContentStatus.cs index 5b3c8fd27b63352f42eb29f3b9b6d1011150d593..99f7a81bf7a9a61ae199a4eca1c15d8b2e5ffdff 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Security/InsecureContentStatus.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Security/InsecureContentStatus.cs @@ -19,6 +19,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security /// </summary> public bool DisplayedMixedContent { get; set; } /// <summary> + /// Gets or sets True if the page was loaded over HTTPS and contained a form targeting an insecure url. + /// </summary> + public bool ContainedMixedForm { get; set; } + /// <summary> /// Gets or sets True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors. /// </summary> public bool RanContentWithCertErrors { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d427a8f6507743736f3892aa1b37fd197a78fdc1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands. + /// </summary> + [Command(ProtocolName.Security.SetOverrideCertificateErrors)] + [SupportedBy("Chrome")] + public class SetOverrideCertificateErrorsCommand + { + /// <summary> + /// Gets or sets If true, certificate errors will be overridden. + /// </summary> + public bool Override { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd90815834148149cde3973123977a19a4128866 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands. + /// </summary> + [CommandResponse(ProtocolName.Security.SetOverrideCertificateErrors)] + [SupportedBy("Chrome")] + public class SetOverrideCertificateErrorsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommandResponse.cs index d68ee87a0be93e6bd8bf833ba708f2dbacf805fc..f0c22eabb0227ef49f62b9c21248841b6f9cc2a3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommandResponse.cs @@ -23,5 +23,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.SystemInfo /// Gets or sets A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported. /// </summary> public string ModelVersion { get; set; } + /// <summary> + /// Gets or sets The command line string used to launch the browser. Will be the empty string if not supported. + /// </summary> + public string CommandLine { get; set; } } } diff --git a/source/ProtocolGenerator/browser_protocol.json b/source/ProtocolGenerator/browser_protocol.json index 83974fd6893ec432fb19a80bbb3461f741b2bde9..a8edd99e01380b00c225eadaf99cedb99a5c02cd 100644 --- a/source/ProtocolGenerator/browser_protocol.json +++ b/source/ProtocolGenerator/browser_protocol.json @@ -1,4 +1,4 @@ -{ +{ "version": { "major": "1", "minor": "2" }, "domains": [{ "domain": "Inspector", @@ -126,6 +126,13 @@ "description": "Unique script identifier.", "experimental": true }, + { + "id": "TransitionType", + "type": "string", + "description": "Transition type.", + "experimental": true, + "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated", "other"] + }, { "id": "NavigationEntry", "type": "object", @@ -133,7 +140,9 @@ "properties": [ { "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." }, { "name": "url", "type": "string", "description": "URL of the navigation history entry." }, - { "name": "title", "type": "string", "description": "Title of the navigation history entry." } + { "name": "userTypedURL", "type": "string", "description": "URL that the user typed in the url bar." }, + { "name": "title", "type": "string", "description": "Title of the navigation history entry." }, + { "name": "transitionType", "$ref": "TransitionType", "description": "Transition type." } ], "experimental": true }, @@ -252,7 +261,8 @@ "name": "navigate", "parameters": [ { "name": "url", "type": "string", "description": "URL to navigate the page to." }, - { "name": "referrer", "type": "string", "optional": true, "experimental": true, "description": "Referrer URL." } + { "name": "referrer", "type": "string", "optional": true, "experimental": true, "description": "Referrer URL." }, + { "name": "transitionType", "$ref": "TransitionType", "optional": true, "experimental": true, "description": "Intended transition type." } ], "returns": [ { "name": "frameId", "$ref": "FrameId", "experimental": true, "description": "Frame id that will be navigated." } @@ -419,7 +429,8 @@ "description": "Capture page screenshot.", "parameters": [ { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format (defaults to png)." }, - { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100] (jpeg only)." } + { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100] (jpeg only)." }, + { "name": "fromSurface", "type": "boolean", "optional": true, "description": "Capture the screenshot from the surface, rather than the view. Defaults to true.", "experimental": true } ], "returns": [ { "name": "data", "type": "string", "description": "Base64-encoded image data." } @@ -428,7 +439,20 @@ }, { "name": "printToPDF", - "description": "Print page as pdf.", + "description": "Print page as PDF.", + "parameters": [ + {"name": "landscape", "type": "boolean", "optional": true, "description": "Paper orientation. Defaults to false."}, + {"name": "displayHeaderFooter", "type": "boolean", "optional": true, "description": "Display header and footer. Defaults to false."}, + {"name": "printBackground", "type": "boolean", "optional": true, "description": "Print background graphics. Defaults to false."}, + {"name": "scale", "type": "number", "optional": true, "description": "Scale of the webpage rendering. Defaults to 1."}, + {"name": "paperWidth", "type": "number", "optional": true, "description": "Paper width in inches. Defaults to 8.5 inches."}, + {"name": "paperHeight", "type": "number", "optional": true, "description": "Paper height in inches. Defaults to 11 inches."}, + {"name": "marginTop", "type": "number", "optional": true, "description": "Top margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "marginBottom", "type": "number", "optional": true, "description": "Bottom margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "marginLeft", "type": "number", "optional": true, "description": "Left margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "marginRight", "type": "number", "optional": true, "description": "Right margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "pageRanges", "type": "string", "optional": true, "description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages."} + ], "returns": [ { "name": "data", "type": "string", "description": "Base64-encoded pdf data." } ], @@ -467,23 +491,6 @@ { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." } ] }, - { - "name": "setColorPickerEnabled", - "parameters": [ - { "name": "enabled", "type": "boolean", "description": "Shows / hides color picker" } - ], - "description": "Shows / hides color picker", - "experimental": true - }, - { - "name": "configureOverlay", - "parameters": [ - { "name": "suspended", "type": "boolean", "optional": true, "description": "Whether overlay should be suspended and not consume any resources." }, - { "name": "message", "type": "string", "optional": true, "description": "Overlay message to display." } - ], - "experimental": true, - "description": "Configures overlay." - }, { "name": "getAppManifest", "experimental": true, @@ -523,6 +530,16 @@ { "name": "visualViewport", "$ref": "VisualViewport", "description": "Metrics relating to the visual viewport." }, { "name": "contentSize", "$ref": "DOM.Rect", "description": "Size of scrollable area."} ] + }, + { + "name": "createIsolatedWorld", + "description": "Creates an isolated world for the given frame.", + "experimental": true, + "parameters": [ + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame in which the isolated world should be created." }, + { "name": "worldName", "type": "string", "optional": true, "description": "An optional name which is reported in the Execution Context." }, + { "name": "grantUniveralAccess", "type": "boolean", "optional": true, "description": "Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution." } + ] } ], "events": [ @@ -543,7 +560,8 @@ "description": "Fired when frame has been attached to its parent.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." }, - { "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." } + { "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." }, + { "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript stack trace of when frame was attached, only set if frame initiated from script.", "experimental": true } ] }, { @@ -630,14 +648,6 @@ ], "experimental": true }, - { - "name": "colorPicked", - "description": "Fired when a color has been picked.", - "parameters": [ - { "name": "color", "$ref": "DOM.RGBA", "description": "RGBA of the picked color." } - ], - "experimental": true - }, { "name": "interstitialShown", "description": "Fired when interstitial page was shown" @@ -659,10 +669,49 @@ ] }, { - "domain": "Rendering", - "description": "This domain allows to control rendering of the page.", + "domain": "Overlay", + "description": "This domain provides various functionality related to drawing atop the inspected page.", + "dependencies": ["DOM", "Page", "Runtime"], "experimental": true, + "types": [ + { + "id": "HighlightConfig", + "type": "object", + "properties": [ + { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." }, + { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." }, + { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." }, + { "name": "displayAsMaterial", "type": "boolean", "optional": true}, + { "name": "contentColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "paddingColor", "$ref": "DOM.RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." }, + { "name": "borderColor", "$ref": "DOM.RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." }, + { "name": "marginColor", "$ref": "DOM.RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." }, + { "name": "eventTargetColor", "$ref": "DOM.RGBA", "optional": true, "description": "The event target element highlight fill color (default: transparent)." }, + { "name": "shapeColor", "$ref": "DOM.RGBA", "optional": true, "description": "The shape outside fill color (default: transparent)." }, + { "name": "shapeMarginColor", "$ref": "DOM.RGBA", "optional": true, "description": "The shape margin fill color (default: transparent)." }, + { "name": "selectorList", "type": "string", "optional": true, "description": "Selectors to highlight relevant nodes."} + ], + "description": "Configuration data for the highlighting of page elements." + }, + { + "id": "InspectMode", + "type": "string", + "enum": [ + "searchForNode", + "searchForUAShadowDOM", + "none" + ] + } + ], "commands": [ + { + "name": "enable", + "description": "Enables domain notifications." + }, + { + "name": "disable", + "description": "Disables domain notifications." + }, { "name": "setShowPaintRects", "description": "Requests that backend shows paint rectangles", @@ -697,6 +746,96 @@ "parameters": [ { "name": "show", "type": "boolean", "description": "Whether to paint size or not." } ] + }, + { + "name": "setPausedInDebuggerMessage", + "parameters": [ + { "name": "message", "type": "string", "optional": true, "description": "The message to display, also triggers resume and step over controls." } + ] + }, + { + "name": "setSuspended", + "parameters": [ + { "name": "suspended", "type": "boolean", "description": "Whether overlay should be suspended and not consume any resources until resumed." } + ] + }, + { + "name": "setInspectMode", + "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.", + "parameters": [ + { "name": "mode", "$ref": "InspectMode", "description": "Set an inspection mode." }, + { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." } + ] + }, + { + "name": "highlightRect", + "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.", + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate" }, + { "name": "y", "type": "integer", "description": "Y coordinate" }, + { "name": "width", "type": "integer", "description": "Rectangle width" }, + { "name": "height", "type": "integer", "description": "Rectangle height" }, + { "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ] + }, + { + "name": "highlightQuad", + "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.", + "parameters": [ + { "name": "quad", "$ref": "DOM.Quad", "description": "Quad to highlight" }, + { "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ] + }, + { + "name": "highlightNode", + "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.", + "parameters": [ + { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." }, + { "name": "nodeId", "$ref": "DOM.NodeId", "optional": true, "description": "Identifier of the node to highlight." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." }, + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted." } + ] + }, + { + "name": "highlightFrame", + "description": "Highlights owner element of the frame with given id.", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." }, + { "name": "contentColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "contentOutlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." } + ] + }, + { + "name": "hideHighlight", + "description": "Hides any highlight." + }, + { + "name": "getHighlightObjectForTest", + "description": "For testing.", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get highlight object for." } + ], + "returns": [ + { "name": "highlight", "type": "object", "description": "Highlight data for the node." } + ] + } + ], + "events": [ + { + "name": "nodeHighlightRequested", + "description": "Fired when the node should be highlighted. This happens after call to <code>setInspectMode</code>.", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ] + }, + { + "name": "inspectNodeRequested", + "description": "Fired when the node should be inspected. This happens after call to <code>setInspectMode</code> or when user manually inspects an element.", + "parameters": [ + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "Id of the node to inspect." } + ] } ] }, @@ -900,12 +1039,19 @@ "properties": [ { "name": "ranMixedContent", "type": "boolean", "description": "True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts." }, { "name": "displayedMixedContent", "type": "boolean", "description": "True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images." }, + { "name": "containedMixedForm", "type": "boolean", "description": "True if the page was loaded over HTTPS and contained a form targeting an insecure url." }, { "name": "ranContentWithCertErrors", "type": "boolean", "description": "True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors." }, { "name": "displayedContentWithCertErrors", "type": "boolean", "description": "True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors." }, { "name": "ranInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that ran insecure content." }, { "name": "displayedInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that displayed insecure content." } ], "description": "Information about insecure content on the page." + }, + { + "id": "CertificateErrorAction", + "type": "string", + "enum": ["continue", "cancel"], + "description": "The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request." } ], "commands": [ @@ -920,6 +1066,21 @@ { "name": "showCertificateViewer", "description": "Displays native dialog with the certificate details." + }, + { + "name": "handleCertificateError", + "description": "Handles a certificate error that fired a certificateError event.", + "parameters": [ + { "name": "eventId", "type": "integer", "description": "The ID of the event."}, + { "name": "action", "$ref": "CertificateErrorAction", "description": "The action to take on the certificate error." } + ] + }, + { + "name": "setOverrideCertificateErrors", + "description": "Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands.", + "parameters": [ + { "name": "override", "type": "boolean", "description": "If true, certificate errors will be overridden."} + ] } ], "events": [ @@ -933,6 +1094,15 @@ { "name": "insecureContentStatus", "$ref": "InsecureContentStatus", "description": "Information about insecure content on the page." }, { "name": "summary", "type": "string", "description": "Overrides user-visible description of the state.", "optional": true } ] + }, + { + "name": "certificateError", + "description": "There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally.", + "parameters": [ + { "name": "eventId", "type": "integer", "description": "The ID of the event."}, + { "name": "errorType", "type": "string", "description": "The type of the error."}, + { "name": "requestURL", "type": "string", "description": "The url that was requested."} + ] } ] }, @@ -1013,7 +1183,8 @@ { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }, { "name": "mixedContentType", "optional": true, "type": "string", "enum": ["blockable", "optionally-blockable", "none"], "description": "The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/" }, { "name": "initialPriority", "$ref": "ResourcePriority", "description": "Priority of the resource request at the time request is sent."}, - { "name": "referrerPolicy", "type": "string", "enum": [ "unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "no-referrer-when-downgrade-origin-when-cross-origin" ], "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/" } + { "name": "referrerPolicy", "type": "string", "enum": [ "unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "no-referrer-when-downgrade-origin-when-cross-origin" ], "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/" }, + { "name": "isLinkPreload", "type": "boolean", "optional": true, "description": "Whether is loaded via link preload." } ] }, { @@ -1197,18 +1368,10 @@ ] }, { - "name": "addBlockedURL", - "description": "Blocks specific URL from loading.", - "parameters": [ - { "name": "url", "type": "string", "description": "URL to block." } - ], - "experimental": true - }, - { - "name": "removeBlockedURL", - "description": "Cancels blocking of a specific URL from loading.", + "name": "setBlockedURLs", + "description": "Blocks URLs from loading.", "parameters": [ - { "name": "url", "type": "string", "description": "URL to stop blocking." } + { "name": "urls", "type": "array", "items": { "type": "string" }, "description": "URL patterns to block. Wildcards ('*') are allowed." } ], "experimental": true }, @@ -1220,14 +1383,6 @@ ], "experimental": true }, - { - "name": "setMonitoringXHREnabled", - "parameters": [ - { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." } - ], - "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.", - "experimental": true - }, { "name": "canClearBrowserCache", "description": "Tells whether clearing browser cache is supported.", @@ -2136,35 +2291,6 @@ { "name": "height", "type": "number", "description": "Rectangle height" } ], "description": "Rectangle." - }, - { - "id": "HighlightConfig", - "type": "object", - "properties": [ - { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." }, - { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." }, - { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." }, - { "name": "displayAsMaterial", "type": "boolean", "optional": true, "experimental": true}, - { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, - { "name": "paddingColor", "$ref": "RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." }, - { "name": "borderColor", "$ref": "RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." }, - { "name": "marginColor", "$ref": "RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." }, - { "name": "eventTargetColor", "$ref": "RGBA", "optional": true, "experimental": true, "description": "The event target element highlight fill color (default: transparent)." }, - { "name": "shapeColor", "$ref": "RGBA", "optional": true, "experimental": true, "description": "The shape outside fill color (default: transparent)." }, - { "name": "shapeMarginColor", "$ref": "RGBA", "optional": true, "experimental": true, "description": "The shape margin fill color (default: transparent)." }, - { "name": "selectorList", "type": "string", "optional": true, "description": "Selectors to highlight relevant nodes."} - ], - "description": "Configuration data for the highlighting of page elements." - }, - { - "id": "InspectMode", - "type": "string", - "experimental": true, - "enum": [ - "searchForNode", - "searchForUAShadowDOM", - "none" - ] } ], "commands": [ @@ -2354,60 +2480,20 @@ ], "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications." }, - { - "name": "setInspectMode", - "experimental": true, - "parameters": [ - { "name": "mode", "$ref": "InspectMode", "description": "Set an inspection mode." }, - { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." } - ], - "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection." - }, { "name": "highlightRect", - "parameters": [ - { "name": "x", "type": "integer", "description": "X coordinate" }, - { "name": "y", "type": "integer", "description": "Y coordinate" }, - { "name": "width", "type": "integer", "description": "Rectangle width" }, - { "name": "height", "type": "integer", "description": "Rectangle height" }, - { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, - { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } - ], - "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport." - }, - { - "name": "highlightQuad", - "parameters": [ - { "name": "quad", "$ref": "Quad", "description": "Quad to highlight" }, - { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, - { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } - ], - "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.", - "experimental": true + "description": "Highlights given rectangle.", + "redirect": "Overlay" }, { "name": "highlightNode", - "parameters": [ - { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." }, - { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Identifier of the node to highlight." }, - { "name": "backendNodeId", "$ref": "BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." }, - { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "experimental": true } - ], - "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified." + "description": "Highlights DOM node.", + "redirect": "Overlay" }, { "name": "hideHighlight", - "description": "Hides DOM node highlight." - }, - { - "name": "highlightFrame", - "parameters": [ - { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." }, - { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, - { "name": "contentOutlineColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." } - ], - "description": "Highlights owner element of the frame with given id.", - "experimental": true + "description": "Hides any highlight.", + "redirect": "Overlay" }, { "name": "pushNodeByPathToFrontend", @@ -2532,7 +2618,8 @@ "name": "getNodeForLocation", "parameters": [ { "name": "x", "type": "integer", "description": "X coordinate." }, - { "name": "y", "type": "integer", "description": "Y coordinate." } + { "name": "y", "type": "integer", "description": "Y coordinate." }, + { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "False to skip to the nearest non-UA shadow root ancestor (default: false)." } ], "returns": [ { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node at given coordinates." } @@ -2550,17 +2637,6 @@ ], "description": "Returns the id of the nearest ancestor that is a relayout boundary.", "experimental": true - }, - { - "name": "getHighlightObjectForTest", - "parameters": [ - { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get highlight object for." } - ], - "returns": [ - { "name": "highlight", "type": "object", "description": "Highlight data for the node." } - ], - "description": "For testing.", - "experimental": true } ], "events": [ @@ -2568,14 +2644,6 @@ "name": "documentUpdated", "description": "Fired when <code>Document</code> has been totally updated. Node ids are no longer valid." }, - { - "name": "inspectNodeRequested", - "parameters": [ - { "name": "backendNodeId", "$ref": "BackendNodeId", "description": "Id of the node to inspect." } - ], - "description": "Fired when the node should be inspected. This happens after call to <code>setInspectMode</code>.", - "experimental" : true - }, { "name": "setChildNodes", "parameters": [ @@ -2686,13 +2754,6 @@ ], "description": "Called when distrubution is changed.", "experimental": true - }, - { - "name": "nodeHighlightRequested", - "parameters": [ - {"name": "nodeId", "$ref": "NodeId"} - ], - "experimental": true } ] }, @@ -2772,7 +2833,8 @@ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment." }, { "name": "isInline", "type": "boolean", "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags." }, { "name": "startLine", "type": "number", "description": "Line offset of the stylesheet within the resource (zero based)." }, - { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." } + { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." }, + { "name": "length", "type": "number", "description": "Size of the content (in characters).", "experimental": true } ], "description": "CSS stylesheet metainformation." }, @@ -2797,7 +2859,7 @@ { "name": "endOffset", "type": "number", "description": "Offset of the end of the rule body from the beginning of the stylesheet." }, { "name": "used", "type": "boolean", "description": "Indicates whether the rule was actually used by some element in the page." } ], - "description": "CSS rule usage information.", + "description": "CSS coverage information.", "experimental": true }, { @@ -3169,12 +3231,20 @@ ], "description": "For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1.", "experimental": true - }, + }, { "name": "startRuleUsageTracking", "description": "Enables the selector recording.", "experimental": true }, + { + "name": "takeCoverageDelta", + "description": "Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)", + "returns": [ + { "name": "coverage", "type": "array", "items": { "$ref": "RuleUsage" } } + ], + "experimental": true + }, { "name": "stopRuleUsageTracking", "returns": [ @@ -3422,7 +3492,7 @@ "name": "sendMessageToTarget", "description": "Sends protocol message to the target with given id.", "parameters": [ - { "name": "targetId", "type": "string" }, + { "name": "targetId", "$ref": "TargetID" }, { "name": "message", "type": "string" } ] }, @@ -3716,6 +3786,13 @@ } ], "commands": [ + { + "name": "setIgnoreInputEvents", + "parameters": [ + { "name": "ignore", "type": "boolean", "description": "Ignores input events processing when set to true." } + ], + "description": "Ignores input events (useful while auditing page)." + }, { "name": "dispatchKeyEvent", "parameters": [ @@ -4522,7 +4599,8 @@ "returns": [ { "name": "gpu", "$ref": "GPUInfo", "description": "Information about the GPUs on the system." }, { "name": "modelName", "type": "string", "description": "A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported." }, - { "name": "modelVersion", "type": "string", "description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported." } + { "name": "modelVersion", "type": "string", "description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported." }, + { "name": "commandLine", "type": "string", "description": "The command line string used to launch the browser. Will be the empty string if not supported." } ] } ] @@ -4557,5 +4635,65 @@ ] } ] + }, + { + "domain": "Browser", + "description": "The Browser domain defines methods and events for browser managing.", + "experimental": true, + "types": [ + { + "id": "WindowID", + "type": "integer" + }, + { + "id": "WindowState", + "type": "string", + "enum": ["normal", "minimized", "maximized", "fullscreen"], + "description": "The state of the browser window." + }, + { + "id": "Bounds", + "type": "object", + "description": "Browser window bounds information", + "properties": [ + { "name": "left", "type": "integer", "optional": true, "description": "The offset from the left edge of the screen to the window in pixels."}, + { "name": "top", "type": "integer", "optional": true, "description": "The offset from the top edge of the screen to the window in pixels."}, + { "name": "width", "type": "integer", "optional": true, "description": "The window width in pixels."}, + { "name": "height", "type": "integer", "optional": true, "description": "The window height in pixels."}, + { "name": "windowState", "$ref": "WindowState", "optional": true, "description": "The window state. Default to normal."} + ] + } + ], + "commands": [ + { + "name": "getWindowForTarget", + "description": "Get the browser window that contains the devtools target.", + "parameters": [ + { "name": "targetId", "$ref": "Target.TargetID", "description": "Devtools agent host id." } + ], + "returns": [ + { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." }, + { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored window position and size are returned." } + ] + }, + { + "name": "setWindowBounds", + "description": "Set position and/or size of the browser window.", + "parameters": [ + { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." }, + { "name": "bounds", "$ref": "Bounds", "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged." } + ] + }, + { + "name": "getWindowBounds", + "description": "Get position and size of the browser window.", + "parameters": [ + { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." } + ], + "returns": [ + { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored window position and size are returned." } + ] + } + ] }] -} \ No newline at end of file +} diff --git a/source/ProtocolGenerator/js_protocol.json b/source/ProtocolGenerator/js_protocol.json index 6e7be57ca966011ff6480ffaf15b740302dc2259..62545cd80d34f2e6dd9434817f09373437b33e2f 100644 --- a/source/ProtocolGenerator/js_protocol.json +++ b/source/ProtocolGenerator/js_protocol.json @@ -52,7 +52,7 @@ "description": "Mirror object referencing original JavaScript object.", "properties": [ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, - { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error", "proxy", "promise", "typedarray"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." }, { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested)." }, { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property." }, @@ -81,7 +81,7 @@ "description": "Object containing abbreviated remote object value.", "properties": [ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, - { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." }, { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }, @@ -97,7 +97,7 @@ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." }, { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." }, { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." }, - { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." } + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." } ] }, { @@ -349,7 +349,7 @@ { "name": "executionContextCreated", "parameters": [ - { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." } + { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution context." } ], "description": "Issued when new execution context is created." }, @@ -545,7 +545,7 @@ "name": "getPossibleBreakpoints", "parameters": [ { "name": "start", "$ref": "Location", "description": "Start of range to search possible breakpoint locations in." }, - { "name": "end", "$ref": "Location", "optional": true, "description": "End of range to search possible breakpoint locations in (excluding). When not specifed, end of scripts is used as end of range." }, + { "name": "end", "$ref": "Location", "optional": true, "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range." }, { "name": "restrictToFunction", "type": "boolean", "optional": true, "description": "Only consider locations which are in the same (non-nested) function as start." } ], "returns": [ @@ -557,7 +557,8 @@ { "name": "continueToLocation", "parameters": [ - { "name": "location", "$ref": "Location", "description": "Location to continue to." } + { "name": "location", "$ref": "Location", "description": "Location to continue to." }, + { "name": "targetCallFrames", "type": "string", "enum": ["any", "current"], "optional": true, "experimental": true } ], "description": "Continues execution until specific location is reached." }, @@ -713,7 +714,8 @@ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "experimental": true }, { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module.", "experimental": true }, - { "name": "length", "type": "integer", "optional": true, "description": "This script length.", "experimental": true } + { "name": "length", "type": "integer", "optional": true, "description": "This script length.", "experimental": true }, + { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true } ], "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger." }, @@ -732,7 +734,8 @@ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "experimental": true }, { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module.", "experimental": true }, - { "name": "length", "type": "integer", "optional": true, "description": "This script length.", "experimental": true } + { "name": "length", "type": "integer", "optional": true, "description": "This script length.", "experimental": true }, + { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true } ], "description": "Fired when virtual machine fails to parse the script." }, @@ -848,10 +851,6 @@ "type": "object", "description": "Coverage data for a source range.", "properties": [ - { "name": "startLineNumber", "type": "integer", "description": "JavaScript script line number (0-based) for the range start." }, - { "name": "startColumnNumber", "type": "integer", "description": "JavaScript script column number (0-based) for the range start." }, - { "name": "endLineNumber", "type": "integer", "description": "JavaScript script line number (0-based) for the range end." }, - { "name": "endColumnNumber", "type": "integer", "description": "JavaScript script column number (0-based) for the range end." }, { "name": "startOffset", "type": "integer", "description": "JavaScript script source offset for the range start." }, { "name": "endOffset", "type": "integer", "description": "JavaScript script source offset for the range end." }, { "name": "count", "type": "integer", "description": "Collected execution count of the source range." } @@ -904,6 +903,9 @@ }, { "name": "startPreciseCoverage", + "parameters": [ + { "name": "callCount", "type": "boolean", "optional": true, "description": "Collect accurate call counts beyond simple 'covered' or 'not covered'." } + ], "description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.", "experimental": true }, @@ -937,7 +939,7 @@ { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." }, { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." } ], - "description": "Sent when new profile recodring is started using console.profile() call." + "description": "Sent when new profile recording is started using console.profile() call." }, { "name": "consoleProfileFinished", @@ -1066,7 +1068,7 @@ }, { "name": "lastSeenObjectId", - "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.", + "description": "If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.", "parameters": [ { "name": "lastSeenObjectId", "type": "integer" }, { "name": "timestamp", "type": "number" } @@ -1081,4 +1083,4 @@ } ] }] -} \ No newline at end of file +}